What kind of exception does the method login(HttpServletRequest request, HttpServletResponse response) throw?
Reveal answer
Fill a bubble to check yourself
What kind of exception does the method login(HttpServletRequest request, HttpServletResponse response) throw?
LoginException
EnterpriseSecurityException
SecurityException
IntrusionException
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.
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.