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:
  • Constructor Details

    • OAuth2AuthorizedClientRefreshedEvent

      public OAuth2AuthorizedClientRefreshedEvent(org.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponse accessTokenResponse, OAuth2AuthorizedClient authorizedClient)
      Creates a new instance with the provided parameters.
      Parameters:
      accessTokenResponse - the OAuth2AccessTokenResponse that triggered the event
      authorizedClient - the refreshed OAuth2AuthorizedClient
  • Method Details

    • getAccessTokenResponse

      public org.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponse getAccessTokenResponse()
      Returns the OAuth2AccessTokenResponse that triggered the event.
      Returns:
      the access token response
    • getAuthorizedClient

      public OAuth2AuthorizedClient getAuthorizedClient()
      Returns the refreshed OAuth2AuthorizedClient.
      Returns:
      the authorized client