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 java.lang.Object implements AuthorizationManager<T>
AnAuthorizationManager
that determines if the current user is authenticated.- Since:
- 5.5
-
-
Constructor Summary
Constructors Constructor Description AuthenticatedAuthorizationManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> AuthenticatedAuthorizationManager<T>
authenticated()
Creates an instance ofAuthenticatedAuthorizationManager
.AuthorizationDecision
check(java.util.function.Supplier<Authentication> authentication, T object)
Determines if the current user is authorized by evaluating if theAuthentication
is not anonymous and authenticated.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.springframework.security.authorization.AuthorizationManager
verify
-
-
-
-
Method Detail
-
authenticated
public static <T> AuthenticatedAuthorizationManager<T> authenticated()
Creates an instance ofAuthenticatedAuthorizationManager
.- Type Parameters:
T
- the type of object being authorized- Returns:
- the new instance
-
check
public AuthorizationDecision check(java.util.function.Supplier<Authentication> authentication, T object)
Determines if the current user is authorized by evaluating if theAuthentication
is not anonymous and authenticated.- Specified by:
check
in interfaceAuthorizationManager<T>
- Parameters:
authentication
- theSupplier
of theAuthentication
to checkobject
- theAuthenticatedAuthorizationManager
object to check- Returns:
- an
AuthorizationDecision
-
-