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.ResolvableTypeGetResolvableTypeof this class.Methods inherited from class org.springframework.security.authorization.event.AuthorizationEvent
getAuthentication, getAuthorizationDecision, getAuthorizationResultMethods inherited from class org.springframework.context.ApplicationEvent
getTimestampMethods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
AuthorizationDeniedEvent
@Deprecated public AuthorizationDeniedEvent(Supplier<Authentication> authentication, T object, AuthorizationDecision decision) Deprecated.Please use anAuthorizationResultconstructor 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:
getObjectin classAuthorizationEvent- Returns:
- the object to which access was requested
- Since:
- 5.8
-
getResolvableType
public org.springframework.core.ResolvableType getResolvableType()GetResolvableTypeof this class.- Specified by:
getResolvableTypein interfaceorg.springframework.core.ResolvableTypeProvider- Returns:
ResolvableType- Since:
- 6.5
-
AuthorizationResultconstructor instead