Class OidcLogoutAuthenticationToken
java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.oauth2.server.authorization.oidc.authentication.OidcLogoutAuthenticationToken
- All Implemented Interfaces:
Serializable,Principal,Authentication,CredentialsContainer
An
Authentication implementation used for OpenID Connect 1.0 RP-Initiated
Logout Endpoint.- Since:
- 7.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
AbstractAuthenticationToken.AbstractAuthenticationBuilder<B extends AbstractAuthenticationToken.AbstractAuthenticationBuilder<B>>Nested classes/interfaces inherited from interface org.springframework.security.core.Authentication
Authentication.Builder<B extends Authentication.Builder<B>> -
Constructor Summary
ConstructorsConstructorDescriptionOidcLogoutAuthenticationToken(String idTokenHint, Authentication principal, String sessionId, String clientId, String postLogoutRedirectUri, String state) Constructs anOidcLogoutAuthenticationTokenusing the provided parameters.OidcLogoutAuthenticationToken(OidcIdToken idToken, Authentication principal, String sessionId, String clientId, String postLogoutRedirectUri, String state) Constructs anOidcLogoutAuthenticationTokenusing the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionReturns the client identifier the ID Token was issued to.The credentials that prove the principal is correct.Returns the ID Token previously issued by the Provider to the Client.Returns the ID Token previously issued by the Provider to the Client and used as a hint about the End-User's current authenticated session with the Client.Returns the URI which the Client is requesting that the End-User's User Agent be redirected to after a logout has been performed.Returns the authenticated principal representing the End-User.Returns the End-User's current authenticated session identifier with the Provider.getState()Returns the opaque value used by the Client to maintain state between the logout request and the callback to thegetPostLogoutRedirectUri().booleanMethods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.security.core.Authentication
toBuilder
-
Constructor Details
-
OidcLogoutAuthenticationToken
public OidcLogoutAuthenticationToken(String idTokenHint, Authentication principal, @Nullable String sessionId, @Nullable String clientId, @Nullable String postLogoutRedirectUri, @Nullable String state) Constructs anOidcLogoutAuthenticationTokenusing the provided parameters.- Parameters:
idTokenHint- the ID Token previously issued by the Provider to the Client and used as a hint about the End-User's current authenticated session with the Clientprincipal- the authenticated principal representing the End-UsersessionId- the End-User's current authenticated session identifier with the ProviderclientId- the client identifier the ID Token was issued topostLogoutRedirectUri- the URI which the Client is requesting that the End-User's User Agent be redirected to after a logout has been performedstate- the opaque value used by the Client to maintain state between the logout request and the callback to thepostLogoutRedirectUri
-
OidcLogoutAuthenticationToken
public OidcLogoutAuthenticationToken(OidcIdToken idToken, Authentication principal, @Nullable String sessionId, @Nullable String clientId, @Nullable String postLogoutRedirectUri, @Nullable String state) Constructs anOidcLogoutAuthenticationTokenusing the provided parameters.- Parameters:
idToken- the ID Token previously issued by the Provider to the Clientprincipal- the authenticated principal representing the End-UsersessionId- the End-User's current authenticated session identifier with the ProviderclientId- the client identifier the ID Token was issued topostLogoutRedirectUri- the URI which the Client is requesting that the End-User's User Agent be redirected to after a logout has been performedstate- the opaque value used by the Client to maintain state between the logout request and the callback to thepostLogoutRedirectUri
-
-
Method Details
-
getPrincipal
Returns the authenticated principal representing the End-User.- Returns:
- the authenticated principal representing the End-User
-
isPrincipalAuthenticated
public boolean isPrincipalAuthenticated()- Returns:
trueifgetPrincipal()is authenticated,falseotherwise
-
getCredentials
Description copied from interface:AuthenticationThe credentials that prove the principal is correct. This is usually a password, but could be anything relevant to theAuthenticationManager. Callers are expected to populate the credentials.- Returns:
- the credentials that prove the identity of the
Principal
-
getIdTokenHint
Returns the ID Token previously issued by the Provider to the Client and used as a hint about the End-User's current authenticated session with the Client.- Returns:
- the ID Token previously issued by the Provider to the Client
-
getIdToken
Returns the ID Token previously issued by the Provider to the Client.- Returns:
- the ID Token previously issued by the Provider to the Client
-
getSessionId
Returns the End-User's current authenticated session identifier with the Provider.- Returns:
- the End-User's current authenticated session identifier with the Provider
-
getClientId
Returns the client identifier the ID Token was issued to.- Returns:
- the client identifier
-
getPostLogoutRedirectUri
Returns the URI which the Client is requesting that the End-User's User Agent be redirected to after a logout has been performed.- Returns:
- the URI which the Client is requesting that the End-User's User Agent be redirected to after a logout has been performed
-
getState
Returns the opaque value used by the Client to maintain state between the logout request and the callback to thegetPostLogoutRedirectUri().- Returns:
- the opaque value used by the Client to maintain state between the logout
request and the callback to the
getPostLogoutRedirectUri()
-