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:
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    Returns the client identifier the ID Token was issued to.
     
    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.
    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.
    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 java.lang.Object

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

    Methods inherited from interface java.security.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

      @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

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

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

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

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