Class AuthenticatedAuthorizationManager<T>
java.lang.Object
org.springframework.security.authorization.AuthenticatedAuthorizationManager<T>
- Type Parameters:
T- the type of object authorization is being performed against. This does not.
- All Implemented Interfaces:
AuthorizationManager<T>
public final class AuthenticatedAuthorizationManager<T>
extends Object
implements AuthorizationManager<T>
An
AuthorizationManager that determines if the current user is authenticated.- Since:
- 5.5
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance that determines if the current user is authenticated, this is the same as callingauthenticated()factory method. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> AuthenticatedAuthorizationManager<T>Creates an instance ofAuthenticatedAuthorizationManagerthat determines if theAuthenticationis anonymous.static <T> AuthenticatedAuthorizationManager<T>Creates an instance ofAuthenticatedAuthorizationManager.check(Supplier<Authentication> authentication, T object) Determines if the current user is authorized according to the given strategy.static <T> AuthenticatedAuthorizationManager<T>Creates an instance ofAuthenticatedAuthorizationManagerthat determines if theAuthenticationis authenticated without using remember me.static <T> AuthenticatedAuthorizationManager<T>Creates an instance ofAuthenticatedAuthorizationManagerthat determines if theAuthenticationis authenticated using remember me.voidsetTrustResolver(AuthenticationTrustResolver trustResolver) Sets theAuthenticationTrustResolverto be used.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.security.authorization.AuthorizationManager
authorize, verify
-
Constructor Details
-
AuthenticatedAuthorizationManager
public AuthenticatedAuthorizationManager()Creates an instance that determines if the current user is authenticated, this is the same as callingauthenticated()factory method.- Since:
- 5.8
- See Also:
-
-
Method Details
-
setTrustResolver
Sets theAuthenticationTrustResolverto be used. Default isAuthenticationTrustResolverImpl. Cannot be null.- Parameters:
trustResolver- theAuthenticationTrustResolverto use- Since:
- 5.8
-
authenticated
Creates an instance ofAuthenticatedAuthorizationManager.- Type Parameters:
T- the type of object being authorized- Returns:
- the new instance
-
fullyAuthenticated
Creates an instance ofAuthenticatedAuthorizationManagerthat determines if theAuthenticationis authenticated without using remember me.- Type Parameters:
T- the type of object being authorized- Returns:
- the new instance
- Since:
- 5.8
-
rememberMe
Creates an instance ofAuthenticatedAuthorizationManagerthat determines if theAuthenticationis authenticated using remember me.- Type Parameters:
T- the type of object being authorized- Returns:
- the new instance
- Since:
- 5.8
-
anonymous
Creates an instance ofAuthenticatedAuthorizationManagerthat determines if theAuthenticationis anonymous.- Type Parameters:
T- the type of object being authorized- Returns:
- the new instance
- Since:
- 5.8
-
check
Determines if the current user is authorized according to the given strategy.- Specified by:
checkin interfaceAuthorizationManager<T>- Parameters:
authentication- theSupplierof theAuthenticationto checkobject- theAuthenticatedAuthorizationManagerobject to check- Returns:
- an
AuthorizationDecision
-