|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.acegisecurity.AuthenticationTrustResolverImpl
public class AuthenticationTrustResolverImpl
Basic implementation of AuthenticationTrustResolver.
Makes trust decisions based on whether the passed
Authentication is an instance of a defined class.
If anonymousClass or rememberMeClass is null,
the corresponding method will always return false.
| Constructor Summary | |
|---|---|
AuthenticationTrustResolverImpl()
|
|
| Method Summary | |
|---|---|
Class |
getAnonymousClass()
|
Class |
getRememberMeClass()
|
boolean |
isAnonymous(Authentication authentication)
Indicates whether the passed Authentication token
represents an anonymous user. |
boolean |
isRememberMe(Authentication authentication)
Indicates whether the passed Authentication token
represents user that has been remembered (ie not a user that has been
fully authenticated). |
void |
setAnonymousClass(Class anonymousClass)
|
void |
setRememberMeClass(Class rememberMeClass)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AuthenticationTrustResolverImpl()
| Method Detail |
|---|
public boolean isAnonymous(Authentication authentication)
AuthenticationTrustResolverAuthentication token
represents an anonymous user. Typically the framework will call this
method if it is trying to decide whether an
AccessDeniedException should result in a final rejection
(ie as would be the case if the principal was non-anonymous/fully
authenticated) or direct the principal to attempt actual authentication
(ie as would be the case if the Authentication was merely
anonymous).
isAnonymous in interface AuthenticationTrustResolverauthentication - to test (may be null in which case
the method will always return false)
true the passed authentication token represented an
anonymous principal, false otherwisepublic void setAnonymousClass(Class anonymousClass)
public Class getAnonymousClass()
public boolean isRememberMe(Authentication authentication)
AuthenticationTrustResolverAuthentication token
represents user that has been remembered (ie not a user that has been
fully authenticated).
No part of the framework uses this method, as it is a weak
definition of trust levels. The method is provided simply 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.
isRememberMe in interface AuthenticationTrustResolverauthentication - to test (may be null in which case
the method will always return false)
true the passed authentication token represented a
principal authenticated using a remember-me token,
false otherwisepublic void setRememberMeClass(Class rememberMeClass)
public Class getRememberMeClass()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||