Package org.springframework.security.authorization.event

# Class AuthorizationGrantedEvent<T>

java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.security.authorization.event.AuthorizationEvent
org.springframework.security.authorization.event.AuthorizationGrantedEvent<T>

All Implemented Interfaces:
  `Serializable`

public class AuthorizationGrantedEvent<T> extends AuthorizationEvent
An `ApplicationEvent` which indicates successful authorization.

Since:
  5.7
See Also:
  - Serialized Form

## Field Summary

### Fields inherited from class java.util.EventObject

`source`

## Constructor Summary

Constructors
Constructor
Description
`AuthorizationGrantedEvent(Supplier<Authentication> authentication, T object, AuthorizationDecision decision)`
Deprecated.
please use a constructor that takes an `AuthorizationResult`
`AuthorizationGrantedEvent(Supplier<Authentication> authentication, T object, AuthorizationResult result)`

## Method Summary

Modifier and Type
Method
Description
`T`
`getObject()`
Get the object to which access was requested

### 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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### AuthorizationGrantedEvent

@Deprecated public AuthorizationGrantedEvent(Supplier<Authentication> authentication, T object, AuthorizationDecision decision)
Deprecated.
please use a constructor that takes an `AuthorizationResult`

### AuthorizationGrantedEvent

public AuthorizationGrantedEvent(Supplier<Authentication> authentication, T object, AuthorizationResult result)

Since:
  6.4

## Method Details

### getObject

public T getObject()
Get the object to which access was requested

Overrides:
  `getObject` in class `AuthorizationEvent`
Returns:
  the object to which access was requested
Since:
  5.8