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:
7.0
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.springframework.security.authentication.AbstractAuthenticationToken

    org.springframework.security.authentication.AbstractAuthenticationToken.AbstractAuthenticationBuilder<B>

    Nested classes/interfaces inherited from interface org.springframework.security.core.Authentication

    org.springframework.security.core.Authentication.Builder<B>
  • Constructor Summary

    Constructors
    Constructor
    Description
    OidcLogoutAuthenticationToken(String idTokenHint, org.springframework.security.core.Authentication principal, @Nullable String sessionId, @Nullable String clientId, @Nullable String postLogoutRedirectUri, @Nullable String state)
    Constructs an OidcLogoutAuthenticationToken using the provided parameters.
    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 an OidcLogoutAuthenticationToken using the provided parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable String
    Returns the client identifier the ID Token was issued to.
     
    @Nullable org.springframework.security.oauth2.core.oidc.OidcIdToken
    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.
    @Nullable String
    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.
    @Nullable String
    Returns the End-User's current authenticated session identifier with the Provider.
    @Nullable String
    Returns the opaque value used by the Client to maintain state between the logout request and the callback to the getPostLogoutRedirectUri().
    boolean
    Returns true if getPrincipal() is authenticated, false otherwise.

    Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken

    equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toString

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.springframework.security.core.Authentication

    toBuilder

    Methods inherited from interface Principal

    implies
  • 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 an OidcLogoutAuthenticationToken using 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 Client
      principal - the authenticated principal representing the End-User
      sessionId - the End-User's current authenticated session identifier with the Provider
      clientId - the client identifier the ID Token was issued to
      postLogoutRedirectUri - the URI which the Client is requesting that the End-User's User Agent be redirected to after a logout has been performed
      state - the opaque value used by the Client to maintain state between the logout request and the callback to the postLogoutRedirectUri
    • 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 an OidcLogoutAuthenticationToken using the provided parameters.
      Parameters:
      idToken - the ID Token previously issued by the Provider to the Client
      principal - the authenticated principal representing the End-User
      sessionId - the End-User's current authenticated session identifier with the Provider
      clientId - the client identifier the ID Token was issued to
      postLogoutRedirectUri - the URI which the Client is requesting that the End-User's User Agent be redirected to after a logout has been performed
      state - the opaque value used by the Client to maintain state between the logout request and the callback to the postLogoutRedirectUri
  • Method Details

    • getPrincipal

      public Object getPrincipal()
      Returns the authenticated principal representing the End-User.
      Returns:
      the authenticated principal representing the End-User
    • isPrincipalAuthenticated

      public boolean isPrincipalAuthenticated()
      Returns true if getPrincipal() is authenticated, false otherwise.
      Returns:
      true if getPrincipal() is authenticated, false otherwise
    • getCredentials

      public Object getCredentials()
    • getIdTokenHint

      public String 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

      public @Nullable 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

      public @Nullable String 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

      public @Nullable String getClientId()
      Returns the client identifier the ID Token was issued to.
      Returns:
      the client identifier
    • getPostLogoutRedirectUri

      public @Nullable String 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

      public @Nullable String getState()
      Returns the opaque value used by the Client to maintain state between the logout request and the callback to the getPostLogoutRedirectUri().
      Returns:
      the opaque value used by the Client to maintain state between the logout request and the callback to the getPostLogoutRedirectUri()