Package org.apache.shiro.authc
Interface AuthenticationListener
-
public interface AuthenticationListener
AnAuthenticationListener
listens for notifications whileSubject
s authenticate with the system.- Since:
- 0.9
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onFailure(AuthenticationToken token, AuthenticationException ae)
Callback triggered when an authentication attempt for aSubject
has failed.void
onLogout(PrincipalCollection principals)
Callback triggered when aSubject
logs-out of the system.void
onSuccess(AuthenticationToken token, AuthenticationInfo info)
Callback triggered when an authentication attempt for aSubject
has succeeded.
-
-
-
Method Detail
-
onSuccess
void onSuccess(AuthenticationToken token, AuthenticationInfo info)
Callback triggered when an authentication attempt for aSubject
has 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 aSubject
has failed.- Parameters:
token
- the authentication token submitted during theSubject
(user)'s authentication attempt.ae
- theAuthenticationException
that occurred as a result of the attempt.
-
onLogout
void onLogout(PrincipalCollection principals)
Callback triggered when aSubject
logs-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.
-
-