public class AmbariAuthenticationEventHandlerImpl extends Object implements AmbariAuthenticationEventHandler
AmbariAuthenticationEventHandler
implementation.
This implementation tracks authentication attempts using the Ambari AuditLogger
and
ensures that the relevant user's consecutive authentication failure count is properly tracked.
Upon an authentication failure, the user's consecutive authentication failure count is incremented
by 1
and upon a successful authentication, the user's consecutive authentication failure count
is reset to 0
.
Constructor and Description |
---|
AmbariAuthenticationEventHandlerImpl() |
Modifier and Type | Method and Description |
---|---|
void |
beforeAttemptAuthentication(AmbariAuthenticationFilter filter,
javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse)
The event callback called just before an authentication attempt.
|
void |
onSuccessfulAuthentication(AmbariAuthenticationFilter filter,
javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse,
org.springframework.security.core.Authentication result)
The event callback called when a successful authentication attempt has occurred.
|
void |
onUnsuccessfulAuthentication(AmbariAuthenticationFilter filter,
javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse,
AmbariAuthenticationException cause)
The event callback called when a failed authentication attempt has occurred.
|
public AmbariAuthenticationEventHandlerImpl()
public void onSuccessfulAuthentication(AmbariAuthenticationFilter filter, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, org.springframework.security.core.Authentication result)
AmbariAuthenticationEventHandler
onSuccessfulAuthentication
in interface AmbariAuthenticationEventHandler
filter
- the Authentication filer used for authenticationservletRequest
- the requestservletResponse
- the responseresult
- the authentication resultpublic void onUnsuccessfulAuthentication(AmbariAuthenticationFilter filter, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, AmbariAuthenticationException cause)
AmbariAuthenticationEventHandler
onUnsuccessfulAuthentication
in interface AmbariAuthenticationEventHandler
filter
- the Authentication filer used for authenticationservletRequest
- the requestservletResponse
- the responsecause
- the exception used to declare the cause for the failurepublic void beforeAttemptAuthentication(AmbariAuthenticationFilter filter, javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse)
AmbariAuthenticationEventHandler
beforeAttemptAuthentication
in interface AmbariAuthenticationEventHandler
filter
- the Authentication filer used for authenticationservletRequest
- the requestservletResponse
- the responseCopyright © 2022 Apache Software Foundation. All rights reserved.