java.lang.Object
org.elasticsearch.xpack.security.authc.saml.SamlToken
All Implemented Interfaces:
org.elasticsearch.xpack.core.security.authc.AuthenticationToken

public class SamlToken extends Object implements org.elasticsearch.xpack.core.security.authc.AuthenticationToken
A very lightweight AuthenticationToken to hold SAML content. Due to the nature of SAML, it is impossible to know the principal for the token until it is parsed and validated, so this token always returns a placeholder value.
See Also:
  • Constructor Details

    • SamlToken

      public SamlToken(byte[] content, List<String> allowedSamlRequestIds, @Nullable String authenticatingRealm)
      Parameters:
      content - The content of the SAML message. This should be raw XML. In particular it should not be base64 encoded.
      allowedSamlRequestIds - The request Ids for the authentication requests this SAML response is allowed to be in response to.
      authenticatingRealm - The realm that should autenticate this SAML message.
  • 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
    • getContent

      public byte[] getContent()
    • getAllowedSamlRequestIds

      public List<String> getAllowedSamlRequestIds()
    • getAuthenticatingRealm

      public String getAuthenticatingRealm()
    • toString

      public String toString()
      Overrides:
      toString in class Object