Class OidcUserRefreshedEvent
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
ConstructorsConstructorDescriptionOidcUserRefreshedEvent
(OAuth2AccessTokenResponse accessTokenResponse, OidcUser oldOidcUser, OidcUser newOidcUser, Authentication authentication) Creates a new instance with the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionReturns theOAuth2AccessTokenResponse
that triggered the event.Returns the authentication result.Returns the refreshedOidcUser
.Returns the originalOidcUser
.Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
Methods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
OidcUserRefreshedEvent
public OidcUserRefreshedEvent(OAuth2AccessTokenResponse accessTokenResponse, OidcUser oldOidcUser, OidcUser newOidcUser, Authentication authentication) Creates a new instance with the provided parameters.- Parameters:
accessTokenResponse
- theOAuth2AccessTokenResponse
that triggered the eventoldOidcUser
- the originalOidcUser
newOidcUser
- the refreshedOidcUser
authentication
- the authentication result
-
-
Method Details
-
getAccessTokenResponse
Returns theOAuth2AccessTokenResponse
that triggered the event.- Returns:
- the access token response
-
getOldOidcUser
Returns the originalOidcUser
.- Returns:
- the original user
-
getNewOidcUser
Returns the refreshedOidcUser
.- Returns:
- the refreshed user
-
getAuthentication
Returns the authentication result.- Returns:
- the authentication result
-