Spring Security SAML

org.springframework.security.saml
Class SAMLAuthenticationToken

java.lang.Object
  extended by org.springframework.security.authentication.AbstractAuthenticationToken
      extended by org.springframework.security.saml.SAMLAuthenticationToken
All Implemented Interfaces:
Serializable, Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer

public class SAMLAuthenticationToken
extends org.springframework.security.authentication.AbstractAuthenticationToken

SAML Token is used to pass SAMLContext object through to the SAML Authentication provider.

Author:
Vladimir Schäfer
See Also:
Serialized Form

Constructor Summary
SAMLAuthenticationToken(SAMLMessageContext credentials)
          Default constructor initializing the context
 
Method Summary
 SAMLMessageContext getCredentials()
          Returns the stored SAML context
 Object getPrincipal()
          Always null
 void setAuthenticated(boolean isAuthenticated)
          This object can never be authenticated, call with true result in exception.
 
Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setDetails, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SAMLAuthenticationToken

public SAMLAuthenticationToken(SAMLMessageContext credentials)
Default constructor initializing the context

Parameters:
credentials - SAML context object created after decoding
Method Detail

getCredentials

public SAMLMessageContext getCredentials()
Returns the stored SAML context

Returns:
context

getPrincipal

public Object getPrincipal()
Always null

Returns:
null

setAuthenticated

public void setAuthenticated(boolean isAuthenticated)
                      throws IllegalArgumentException
This object can never be authenticated, call with true result in exception.

Specified by:
setAuthenticated in interface org.springframework.security.core.Authentication
Overrides:
setAuthenticated in class org.springframework.security.authentication.AbstractAuthenticationToken
Parameters:
isAuthenticated - only false value allowed
Throws:
IllegalArgumentException - if isAuthenticated is true

Spring Security SAML