Multiple choice technology security

What kind of exception does the method login(HttpServletRequest request, HttpServletResponse response) throw?

  1. LoginException

  2. EnterpriseSecurityException

  3. SecurityException

  4. IntrusionException

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The login method throws EnterpriseSecurityException, which is a custom exception specific to the security framework being used. Standard Java exceptions like LoginException, SecurityException, or IntrusionException are not the correct custom exception for this API.

AI explanation

ESAPI's login(HttpServletRequest, HttpServletResponse) method throws AuthenticationException when credentials fail or the account is disabled/expired/locked. AuthenticationException is a subclass of ESAPI's EnterpriseSecurityException, the root of ESAPI's own exception hierarchy — it is unrelated to the built-in java.lang.SecurityException, which ESAPI does not throw here.