Class Saml2UserAuthenticationInputToken

java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
se.swedenconnect.spring.saml.idp.authentication.Saml2UserAuthenticationInputToken
All Implemented Interfaces:
Serializable, Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer

public class Saml2UserAuthenticationInputToken extends org.springframework.security.authentication.AbstractAuthenticationToken
An Authentication class that represents the input to a user authentication process for a SAML IdP.
Author:
Martin Lindström
See Also:
  • Constructor Details

    • Saml2UserAuthenticationInputToken

      public Saml2UserAuthenticationInputToken(Saml2AuthnRequestAuthenticationToken authnRequestToken, AuthenticationRequirements authnRequirements)
      Constructor.
      Parameters:
      authnRequestToken - the authentication request token
      authnRequirements - the authentication requirements
  • Method Details

    • getAuthnRequestToken

      public Saml2AuthnRequestAuthenticationToken getAuthnRequestToken()
      Gets the authentication request token.
      Returns:
      the authentication request token
    • getAuthnRequirements

      public AuthenticationRequirements getAuthnRequirements()
      Gets the authentication requirements.
      Returns:
      the authentication requirements
    • getUserAuthentication

      public org.springframework.security.core.Authentication getUserAuthentication()
      If an Authentication object is available (from the SecurityContextHolder) when entering the SAML flow, this object is made available to the authentication process that will determine if this authentication object may be used for SSO.
      Returns:
      the Authentication object from a previous authentication, or null if not available
    • setUserAuthentication

      public void setUserAuthentication(org.springframework.security.core.Authentication userAuthentication)
      Assigns the user Authentication object from a previous authentication process.
      Parameters:
      userAuthentication - an Authentication object
    • getCredentials

      public Object getCredentials()
    • getPrincipal

      public Object getPrincipal()
    • getUiInfo

      public Saml2ServiceProviderUiInfo getUiInfo()
      Gets the UI info - may be useful for IdP UI.
      Returns:
      a Saml2ServiceProviderUiInfo
    • getLogString

      public String getLogString()
      Returns:
      a formatted log string