Class AuthenticationTrustResolverImpl
- java.lang.Object
- 
- org.springframework.security.authentication.AuthenticationTrustResolverImpl
 
- 
- All Implemented Interfaces:
- AuthenticationTrustResolver
 
 public class AuthenticationTrustResolverImpl extends java.lang.Object implements AuthenticationTrustResolver Basic implementation ofAuthenticationTrustResolver.Makes trust decisions based on whether the passed Authenticationis an instance of a defined class.If anonymousClassorrememberMeClassisnull, the corresponding method will always returnfalse.
- 
- 
Constructor SummaryConstructors Constructor Description AuthenticationTrustResolverImpl()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisAnonymous(Authentication authentication)Indicates whether the passedAuthenticationtoken represents an anonymous user.booleanisRememberMe(Authentication authentication)Indicates whether the passedAuthenticationtoken represents user that has been remembered (i.e.voidsetAnonymousClass(java.lang.Class<? extends Authentication> anonymousClass)voidsetRememberMeClass(java.lang.Class<? extends Authentication> rememberMeClass)
 
- 
- 
- 
Method Detail- 
isAnonymouspublic boolean isAnonymous(Authentication authentication) Description copied from interface:AuthenticationTrustResolverIndicates whether the passedAuthenticationtoken represents an anonymous user. Typically the framework will call this method if it is trying to decide whether anAccessDeniedExceptionshould result in a final rejection (i.e. as would be the case if the principal was non-anonymous/fully authenticated) or direct the principal to attempt actual authentication (i.e. as would be the case if theAuthenticationwas merely anonymous).- Specified by:
- isAnonymousin interface- AuthenticationTrustResolver
- Parameters:
- authentication- to test (may be- nullin which case the method will always return- false)
- Returns:
- truethe passed authentication token represented an anonymous principal,- falseotherwise
 
 - 
isRememberMepublic boolean isRememberMe(Authentication authentication) Description copied from interface:AuthenticationTrustResolverIndicates whether the passedAuthenticationtoken represents user that has been remembered (i.e. not a user that has been fully authenticated).The method is provided to assist with custom AccessDecisionVoters and the like that you might develop. Of course, you don't need to use this method either and can develop your own "trust level" hierarchy instead.- Specified by:
- isRememberMein interface- AuthenticationTrustResolver
- Parameters:
- authentication- to test (may be- nullin which case the method will always return- false)
- Returns:
- truethe passed authentication token represented a principal authenticated using a remember-me token,- falseotherwise
 
 - 
setAnonymousClasspublic void setAnonymousClass(java.lang.Class<? extends Authentication> anonymousClass) 
 - 
setRememberMeClasspublic void setRememberMeClass(java.lang.Class<? extends Authentication> rememberMeClass) 
 
- 
 
-