Class OidcLogoutAuthenticationToken
java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.oauth2.server.authorization.oidc.authentication.OidcLogoutAuthenticationToken
- All Implemented Interfaces:
Serializable,Principal,org.springframework.security.core.Authentication,org.springframework.security.core.CredentialsContainer
public class OidcLogoutAuthenticationToken
extends org.springframework.security.authentication.AbstractAuthenticationToken
An
Authentication implementation used for OpenID Connect 1.0 RP-Initiated
Logout Endpoint.- Since:
- 1.1
- See Also:
-
AbstractAuthenticationTokenOidcLogoutAuthenticationProvider- Serialized Form
-
Constructor Summary
ConstructorsConstructorDescriptionOidcLogoutAuthenticationToken(String idTokenHint, org.springframework.security.core.Authentication principal, String sessionId, String clientId, String postLogoutRedirectUri, String state) Constructs anOidcLogoutAuthenticationTokenusing the provided parameters.OidcLogoutAuthenticationToken(org.springframework.security.oauth2.core.oidc.OidcIdToken idToken, org.springframework.security.core.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.org.springframework.security.oauth2.core.oidc.OidcIdTokenReturns 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, toString
-
Constructor Details
-
OidcLogoutAuthenticationToken
public OidcLogoutAuthenticationToken(String idTokenHint, org.springframework.security.core.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(org.springframework.security.oauth2.core.oidc.OidcIdToken idToken, org.springframework.security.core.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
-
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
@Nullable public org.springframework.security.oauth2.core.oidc.OidcIdToken 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()
-