Package org.apache.shiro.authc
Interface AuthenticationListener
-
public interface AuthenticationListenerAnAuthenticationListenerlistens for notifications whileSubjects authenticate with the system.- Since:
- 0.9
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonFailure(AuthenticationToken token, AuthenticationException ae)Callback triggered when an authentication attempt for aSubjecthas failed.voidonLogout(PrincipalCollection principals)Callback triggered when aSubjectlogs-out of the system.voidonSuccess(AuthenticationToken token, AuthenticationInfo info)Callback triggered when an authentication attempt for aSubjecthas succeeded.
-
-
-
Method Detail
-
onSuccess
void onSuccess(AuthenticationToken token, AuthenticationInfo info)
Callback triggered when an authentication attempt for aSubjecthas succeeded.- Parameters:
token- the authentication token submitted during theSubject(user)'s authentication attempt.info- the authentication-related account data acquired after authentication for the correspondingSubject.
-
onFailure
void onFailure(AuthenticationToken token, AuthenticationException ae)
Callback triggered when an authentication attempt for aSubjecthas failed.- Parameters:
token- the authentication token submitted during theSubject(user)'s authentication attempt.ae- theAuthenticationExceptionthat occurred as a result of the attempt.
-
onLogout
void onLogout(PrincipalCollection principals)
Callback triggered when aSubjectlogs-out of the system. This method will only be triggered when a Subject explicitly logs-out of the session. It will not be triggered if their Session times out.- Parameters:
principals- the identifying principals of the Subject logging out.
-
-