java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.security.oauth2.client.oidc.authentication.event.OidcUserRefreshedEvent
All Implemented Interfaces:
Serializable

public final class OidcUserRefreshedEvent extends org.springframework.context.ApplicationEvent
An event that is published when an OidcUser is refreshed as a result of using a refresh_token to obtain an OAuth 2.0 Access Token Response that contains an id_token.
Since:
6.5
See Also:
  • Field Summary

    Fields inherited from class java.util.EventObject

    source
  • Constructor Summary

    Constructors
    Constructor
    Description
    OidcUserRefreshedEvent(org.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponse accessTokenResponse, org.springframework.security.oauth2.core.oidc.user.OidcUser oldOidcUser, org.springframework.security.oauth2.core.oidc.user.OidcUser newOidcUser, org.springframework.security.core.Authentication authentication)
    Creates a new instance with the provided parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponse
    Returns the OAuth2AccessTokenResponse that triggered the event.
    org.springframework.security.core.Authentication
    Returns the authentication result.
    org.springframework.security.oauth2.core.oidc.user.OidcUser
    Returns the refreshed OidcUser.
    org.springframework.security.oauth2.core.oidc.user.OidcUser
    Returns the original OidcUser.

    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

    • OidcUserRefreshedEvent

      public OidcUserRefreshedEvent(org.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponse accessTokenResponse, org.springframework.security.oauth2.core.oidc.user.OidcUser oldOidcUser, org.springframework.security.oauth2.core.oidc.user.OidcUser newOidcUser, org.springframework.security.core.Authentication authentication)
      Creates a new instance with the provided parameters.
      Parameters:
      accessTokenResponse - the OAuth2AccessTokenResponse that triggered the event
      oldOidcUser - the original OidcUser
      newOidcUser - the refreshed OidcUser
      authentication - the authentication result
  • Method Details

    • getAccessTokenResponse

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

      public org.springframework.security.oauth2.core.oidc.user.OidcUser getOldOidcUser()
      Returns the original OidcUser.
      Returns:
      the original user
    • getNewOidcUser

      public org.springframework.security.oauth2.core.oidc.user.OidcUser getNewOidcUser()
      Returns the refreshed OidcUser.
      Returns:
      the refreshed user
    • getAuthentication

      public org.springframework.security.core.Authentication getAuthentication()
      Returns the authentication result.
      Returns:
      the authentication result