nl.surfnet.mujina.spring
Class SAMLAuthenticationToken

java.lang.Object
  extended by org.springframework.security.authentication.AbstractAuthenticationToken
      extended by nl.surfnet.mujina.spring.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

See Also:
Serialized Form

Constructor Summary
SAMLAuthenticationToken(org.opensaml.saml2.core.Response response, String credentials, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
          This constructor can be safely used by any code that wishes to create a UsernamePasswordAuthenticationToken, as the AbstractAuthenticationToken.isAuthenticated() will return false.
SAMLAuthenticationToken(User user, String credentials, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
          This constructor should only be used by AuthenticationManager or AuthenticationProvider implementations that are satisfied with producing a trusted (i.e.
 
Method Summary
 Object getCredentials()
           
 Object getPrincipal()
           
 void setAuthenticated(boolean isAuthenticated)
           
 
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(org.opensaml.saml2.core.Response response,
                               String credentials,
                               Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
This constructor can be safely used by any code that wishes to create a UsernamePasswordAuthenticationToken, as the AbstractAuthenticationToken.isAuthenticated() will return false.

Parameters:
response -
credentials -

SAMLAuthenticationToken

public SAMLAuthenticationToken(User user,
                               String credentials,
                               Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
This constructor should only be used by AuthenticationManager or AuthenticationProvider implementations that are satisfied with producing a trusted (i.e. AbstractAuthenticationToken.isAuthenticated() = true) authentication token.

Parameters:
user -
credentials -
authorities -
Method Detail

getCredentials

public Object getCredentials()

getPrincipal

public Object getPrincipal()

setAuthenticated

public void setAuthenticated(boolean isAuthenticated)
                      throws IllegalArgumentException
Specified by:
setAuthenticated in interface org.springframework.security.core.Authentication
Overrides:
setAuthenticated in class org.springframework.security.authentication.AbstractAuthenticationToken
Throws:
IllegalArgumentException


Copyright © 2009-2012 SURFnet bv, The Netherlands. All Rights Reserved.