Class OAuth2AuthorizedClientRefreshedEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.security.oauth2.client.event.OAuth2AuthorizedClientRefreshedEvent
- All Implemented Interfaces:
Serializable
public final class OAuth2AuthorizedClientRefreshedEvent
extends org.springframework.context.ApplicationEvent
An event that is published when an
OAuth2AuthorizedClient
is refreshed as a
result of using a refresh_token
to obtain an OAuth 2.0 Access Token Response.- Since:
- 6.5
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionOAuth2AuthorizedClientRefreshedEvent
(OAuth2AccessTokenResponse accessTokenResponse, OAuth2AuthorizedClient authorizedClient) Creates a new instance with the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionReturns theOAuth2AccessTokenResponse
that triggered the event.Returns the refreshedOAuth2AuthorizedClient
.Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
Methods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
OAuth2AuthorizedClientRefreshedEvent
public OAuth2AuthorizedClientRefreshedEvent(OAuth2AccessTokenResponse accessTokenResponse, OAuth2AuthorizedClient authorizedClient) Creates a new instance with the provided parameters.- Parameters:
accessTokenResponse
- theOAuth2AccessTokenResponse
that triggered the eventauthorizedClient
- the refreshedOAuth2AuthorizedClient
-
-
Method Details
-
getAccessTokenResponse
Returns theOAuth2AccessTokenResponse
that triggered the event.- Returns:
- the access token response
-
getAuthorizedClient
Returns the refreshedOAuth2AuthorizedClient
.- Returns:
- the authorized client
-