Class AuthorizationDeniedEvent<T>
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.security.authorization.event.AuthorizationEvent
org.springframework.security.authorization.event.AuthorizationDeniedEvent<T>
- All Implemented Interfaces:
Serializable
,org.springframework.core.ResolvableTypeProvider
public class AuthorizationDeniedEvent<T>
extends AuthorizationEvent
implements org.springframework.core.ResolvableTypeProvider
An
ApplicationEvent
which indicates failed authorization.- Since:
- 5.7
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionAuthorizationDeniedEvent
(Supplier<Authentication> authentication, T object, AuthorizationDecision decision) Deprecated.AuthorizationDeniedEvent
(Supplier<Authentication> authentication, T object, AuthorizationResult result) -
Method Summary
Modifier and TypeMethodDescriptionGet the object to which access was requestedorg.springframework.core.ResolvableType
GetResolvableType
of this class.Methods inherited from class org.springframework.security.authorization.event.AuthorizationEvent
getAuthentication, getAuthorizationDecision, getAuthorizationResult
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
Methods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
AuthorizationDeniedEvent
@Deprecated public AuthorizationDeniedEvent(Supplier<Authentication> authentication, T object, AuthorizationDecision decision) Deprecated.Please use anAuthorizationResult
constructor instead -
AuthorizationDeniedEvent
public AuthorizationDeniedEvent(Supplier<Authentication> authentication, T object, AuthorizationResult result) - Since:
- 6.4
-
-
Method Details
-
getObject
Get the object to which access was requested- Overrides:
getObject
in classAuthorizationEvent
- Returns:
- the object to which access was requested
- Since:
- 5.8
-
getResolvableType
public org.springframework.core.ResolvableType getResolvableType()GetResolvableType
of this class.- Specified by:
getResolvableType
in interfaceorg.springframework.core.ResolvableTypeProvider
- Returns:
ResolvableType
- Since:
- 6.5
-
AuthorizationResult
constructor instead