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(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 TypeMethodDescriptionorg.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponseReturns theOAuth2AccessTokenResponsethat triggered the event.org.springframework.security.core.AuthenticationReturns the authentication result.org.springframework.security.oauth2.core.oidc.user.OidcUserReturns the refreshedOidcUser.org.springframework.security.oauth2.core.oidc.user.OidcUserReturns the originalOidcUser.Methods inherited from class org.springframework.context.ApplicationEvent
getTimestampMethods inherited from class java.util.EventObject
getSource, toString
-
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- theOAuth2AccessTokenResponsethat triggered the eventoldOidcUser- the originalOidcUsernewOidcUser- the refreshedOidcUserauthentication- the authentication result
-
-
Method Details
-
getAccessTokenResponse
public org.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponse getAccessTokenResponse()Returns theOAuth2AccessTokenResponsethat triggered the event.- Returns:
- the access token response
-
getOldOidcUser
public org.springframework.security.oauth2.core.oidc.user.OidcUser getOldOidcUser()Returns the originalOidcUser.- Returns:
- the original user
-
getNewOidcUser
public org.springframework.security.oauth2.core.oidc.user.OidcUser getNewOidcUser()Returns the refreshedOidcUser.- Returns:
- the refreshed user
-
getAuthentication
public org.springframework.security.core.Authentication getAuthentication()Returns the authentication result.- Returns:
- the authentication result
-