Class AuthorizationEvent
- java.lang.Object
-
- java.util.EventObject
-
- org.springframework.context.ApplicationEvent
-
- org.springframework.security.authorization.event.AuthorizationEvent
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
AuthorizationDeniedEvent
,AuthorizationGrantedEvent
public class AuthorizationEvent extends org.springframework.context.ApplicationEvent
A parent class forAuthorizationGrantedEvent
andAuthorizationDeniedEvent
.- Since:
- 5.8
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AuthorizationEvent(java.util.function.Supplier<Authentication> authentication, java.lang.Object object, AuthorizationDecision decision)
Construct anAuthorizationEvent
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.function.Supplier<Authentication>
getAuthentication()
Get the principal requiring accessAuthorizationDecision
getAuthorizationDecision()
Get the response to the princpal's requestjava.lang.Object
getObject()
Get the object to which access was requested
-
-
-
Constructor Detail
-
AuthorizationEvent
public AuthorizationEvent(java.util.function.Supplier<Authentication> authentication, java.lang.Object object, AuthorizationDecision decision)
Construct anAuthorizationEvent
- Parameters:
authentication
- the principal requiring accessobject
- the object to which access was requesteddecision
- whether authorization was granted or denied
-
-
Method Detail
-
getAuthentication
public java.util.function.Supplier<Authentication> getAuthentication()
Get the principal requiring access- Returns:
- the principal requiring access
-
getObject
public java.lang.Object getObject()
Get the object to which access was requested- Returns:
- the object to which access was requested
-
getAuthorizationDecision
public AuthorizationDecision getAuthorizationDecision()
Get the response to the princpal's request- Returns:
-
-