Class AuthenticationProcessEventAuditor
- java.lang.Object
-
- com.sun.identity.authentication.audit.AbstractAuthenticationEventAuditor
-
- com.sun.identity.authentication.audit.AuthenticationProcessEventAuditor
-
public class AuthenticationProcessEventAuditor extends AbstractAuthenticationEventAuditor
This auditor is specifically aimed at constructing and logging authentication events for the login process.- Since:
- 13.0.0
-
-
Field Summary
-
Fields inherited from class com.sun.identity.authentication.audit.AbstractAuthenticationEventAuditor
eventFactory, eventPublisher
-
-
Constructor Summary
Constructors Constructor Description AuthenticationProcessEventAuditor(AuditEventPublisher eventPublisher, AuditEventFactory eventFactory)
Constructor forAuthenticationProcessEventAuditor
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
auditLoginFailure(LoginState loginState)
Log an authentication process failure event.void
auditLoginFailure(LoginState loginState, AuditConstants.AuthenticationFailureReason failureReason)
Log an authentication process failure event.void
auditLoginSuccess(LoginState loginState)
Log an authentication process successful completion event.void
auditLogout(SSOToken token)
Log a logout event.-
Methods inherited from class com.sun.identity.authentication.audit.AbstractAuthenticationEventAuditor
getFailedPrincipal, getRealmFromState, getRealmFromToken, getTrackingIds, getUserId
-
-
-
-
Constructor Detail
-
AuthenticationProcessEventAuditor
@Inject public AuthenticationProcessEventAuditor(AuditEventPublisher eventPublisher, AuditEventFactory eventFactory)
Constructor forAuthenticationProcessEventAuditor
.- Parameters:
eventPublisher
- The publisher responsible for logging the events.eventFactory
- The factory that can be used to create the events.
-
-
Method Detail
-
auditLoginSuccess
public void auditLoginSuccess(LoginState loginState)
Log an authentication process successful completion event.- Parameters:
loginState
- The login state object.
-
auditLoginFailure
public void auditLoginFailure(LoginState loginState)
Log an authentication process failure event.- Parameters:
loginState
- The login state object.
-
auditLoginFailure
public void auditLoginFailure(LoginState loginState, AuditConstants.AuthenticationFailureReason failureReason)
Log an authentication process failure event.- Parameters:
loginState
- The login state object.failureReason
- The reason for the failure. If failureReason is null then the value ofLoginState.getErrorCode()
will be mapped to anAuditConstants.AuthenticationFailureReason
withAuditConstants.AuthenticationFailureReason.LOGIN_FAILED
as default if the value could not be mapped.
-
auditLogout
public void auditLogout(SSOToken token)
Log a logout event.- Parameters:
token
- The of the event.
-
-