Package org.apache.shiro.mgt
Interface RememberMeManager
-
- All Known Implementing Classes:
AbstractRememberMeManager
public interface RememberMeManagerA RememberMeManager is responsible for remembering a Subject's identity across that Subject's sessions with the application.- Since:
- 0.9
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidforgetIdentity(SubjectContext subjectContext)Forgets any remembered identity corresponding to the subject context map being used to build a subject instance.PrincipalCollectiongetRememberedPrincipals(SubjectContext subjectContext)Based on the specified subject context map being used to build a Subject instance, returns any previously remembered principals for the subject for automatic identity association (aka 'Remember Me').voidonFailedLogin(Subject subject, AuthenticationToken token, AuthenticationException ae)Reacts to a failed authentication attempt, typically by forgetting any previously remembered principals for the Subject.voidonLogout(Subject subject)Reacts to a Subject logging out of the application, typically by forgetting any previously remembered principals for the Subject.voidonSuccessfulLogin(Subject subject, AuthenticationToken token, AuthenticationInfo info)Reacts to a successful authentication attempt, typically saving the principals to be retrieved ('remembered') for future system access.
-
-
-
Method Detail
-
getRememberedPrincipals
PrincipalCollection getRememberedPrincipals(SubjectContext subjectContext)
Based on the specified subject context map being used to build a Subject instance, returns any previously remembered principals for the subject for automatic identity association (aka 'Remember Me'). The context map is usually populated by aSubject.Builderimplementation. See theSubjectFactoryclass constants for Shiro's known map keys.- Parameters:
subjectContext- the contextual data, usually provided by aSubject.Builderimplementation, that is being used to construct aSubjectinstance.- Returns:
- he remembered principals or
nullif none could be acquired. - Since:
- 1.0
-
forgetIdentity
void forgetIdentity(SubjectContext subjectContext)
Forgets any remembered identity corresponding to the subject context map being used to build a subject instance. The context map is usually populated by aSubject.Builderimplementation. See theSubjectFactoryclass constants for Shiro's known map keys.- Parameters:
subjectContext- the contextual data, usually provided by aSubject.Builderimplementation, that is being used to construct aSubjectinstance.- Since:
- 1.0
-
onSuccessfulLogin
void onSuccessfulLogin(Subject subject, AuthenticationToken token, AuthenticationInfo info)
Reacts to a successful authentication attempt, typically saving the principals to be retrieved ('remembered') for future system access.- Parameters:
subject- the subject that executed a successful authentication attempttoken- the authentication token submitted resulting in a successful authentication attemptinfo- the authenticationInfo returned as a result of the successful authentication attempt- Since:
- 1.0
-
onFailedLogin
void onFailedLogin(Subject subject, AuthenticationToken token, AuthenticationException ae)
Reacts to a failed authentication attempt, typically by forgetting any previously remembered principals for the Subject.- Parameters:
subject- the subject that executed the failed authentication attempttoken- the authentication token submitted resulting in the failed authentication attemptae- the authentication exception thrown as a result of the failed authentication attempt- Since:
- 1.0
-
onLogout
void onLogout(Subject subject)
Reacts to a Subject logging out of the application, typically by forgetting any previously remembered principals for the Subject.- Parameters:
subject- the subject logging out.- Since:
- 1.0
-
-