Class OpenIdConnectToken

java.lang.Object
org.elasticsearch.xpack.security.authc.oidc.OpenIdConnectToken
All Implemented Interfaces:
org.elasticsearch.xpack.core.security.authc.AuthenticationToken

public class OpenIdConnectToken extends Object implements org.elasticsearch.xpack.core.security.authc.AuthenticationToken
A AuthenticationToken to hold OpenID Connect related content. Depending on the flow the token can contain only a code ( oAuth2 authorization code grant flow ) or even an Identity Token ( oAuth2 implicit flow )
  • Constructor Details

    • OpenIdConnectToken

      public OpenIdConnectToken(String redirectUrl, com.nimbusds.oauth2.sdk.id.State state, com.nimbusds.openid.connect.sdk.Nonce nonce, @Nullable String authenticatingRealm)
      Parameters:
      redirectUrl - The URI where the OP redirected the browser after the authentication event at the OP. This is passed as is from the facilitator entity (i.e. Kibana), so it is URL Encoded. It contains either the code or the id_token itself depending on the flow used
      state - The state value that we generated or the facilitator provided for this specific flow and should be stored at the user's session with the facilitator.
      nonce - The nonce value that we generated or the facilitator provided for this specific flow and should be stored at the user's session with the facilitator.
      authenticatingRealm - The realm that should authenticate this OpenId Connect Authentication Response
  • Method Details

    • principal

      public String principal()
      Specified by:
      principal in interface org.elasticsearch.xpack.core.security.authc.AuthenticationToken
    • credentials

      public Object credentials()
      Specified by:
      credentials in interface org.elasticsearch.xpack.core.security.authc.AuthenticationToken
    • clearCredentials

      public void clearCredentials()
      Specified by:
      clearCredentials in interface org.elasticsearch.xpack.core.security.authc.AuthenticationToken
    • getState

      public com.nimbusds.oauth2.sdk.id.State getState()
    • getNonce

      public com.nimbusds.openid.connect.sdk.Nonce getNonce()
    • getRedirectUrl

      public String getRedirectUrl()
    • getAuthenticatingRealm

      public String getAuthenticatingRealm()
    • toString

      public String toString()
      Overrides:
      toString in class Object