Apache CXF API

org.apache.cxf.sts.token.provider
Class SAMLTokenProvider

java.lang.Object
  extended by org.apache.cxf.sts.token.provider.SAMLTokenProvider
All Implemented Interfaces:
TokenProvider

public class SAMLTokenProvider
extends Object
implements TokenProvider

A TokenProvider implementation that provides a SAML Token.


Constructor Summary
SAMLTokenProvider()
           
 
Method Summary
 boolean canHandleToken(String tokenType)
          Return true if this TokenProvider implementation is capable of providing a token that corresponds to the given TokenType.
 boolean canHandleToken(String tokenType, String realm)
          Return true if this TokenProvider implementation is capable of providing a token that corresponds to the given TokenType in a given realm.
 SamlCallbackHandler createCallbackHandler(TokenProviderParameters tokenParameters, byte[] secret, SAMLRealm samlRealm, Document doc)
           
 TokenProviderResponse createToken(TokenProviderParameters tokenParameters)
          Create a token given a TokenProviderParameters
 List<AttributeStatementProvider> getAttributeStatementProviders()
          Get the List of AttributeStatementProviders.
 List<AuthDecisionStatementProvider> getAuthDecisionStatementProviders()
          Get the List of AuthDecisionStatementProviders.
 List<AuthenticationStatementProvider> getAuthenticationStatementProviders()
          Get the List of AuthenticationStatementProviders.
 ConditionsProvider getConditionsProvider()
          Get the ConditionsProvider
 Map<String,SAMLRealm> getRealmMap()
          Get the map of realm->SAMLRealm for this token provider
 SubjectProvider getSubjectProvider()
          Get the SubjectProvider.
 boolean isSignToken()
          Return whether the provided token will be signed or not.
 void setAttributeStatementProviders(List<AttributeStatementProvider> attributeStatementProviders)
          Set the List of AttributeStatementProviders.
 void setAuthDecisionStatementProviders(List<AuthDecisionStatementProvider> authDecisionStatementProviders)
          Set the List of AuthDecisionStatementProviders.
 void setAuthenticationStatementProviders(List<AuthenticationStatementProvider> authnStatementProviders)
          Set the List of AuthenticationStatementProviders.
 void setConditionsProvider(ConditionsProvider conditionsProvider)
          Set the ConditionsProvider
 void setRealmMap(Map<String,SAMLRealm> realms)
          Set the map of realm->SAMLRealm for this token provider
 void setSamlCustomHandler(SamlCustomHandler samlCustomHandler)
           
 void setSignToken(boolean signToken)
          Set whether the provided token will be signed or not.
 void setSubjectProvider(SubjectProvider subjectProvider)
          Set the SubjectProvider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAMLTokenProvider

public SAMLTokenProvider()
Method Detail

canHandleToken

public boolean canHandleToken(String tokenType)
Return true if this TokenProvider implementation is capable of providing a token that corresponds to the given TokenType.

Specified by:
canHandleToken in interface TokenProvider

canHandleToken

public boolean canHandleToken(String tokenType,
                              String realm)
Return true if this TokenProvider implementation is capable of providing a token that corresponds to the given TokenType in a given realm.

Specified by:
canHandleToken in interface TokenProvider

createToken

public TokenProviderResponse createToken(TokenProviderParameters tokenParameters)
Create a token given a TokenProviderParameters

Specified by:
createToken in interface TokenProvider

setAttributeStatementProviders

public void setAttributeStatementProviders(List<AttributeStatementProvider> attributeStatementProviders)
Set the List of AttributeStatementProviders.


getAttributeStatementProviders

public List<AttributeStatementProvider> getAttributeStatementProviders()
Get the List of AttributeStatementProviders.


setAuthenticationStatementProviders

public void setAuthenticationStatementProviders(List<AuthenticationStatementProvider> authnStatementProviders)
Set the List of AuthenticationStatementProviders.


getAuthenticationStatementProviders

public List<AuthenticationStatementProvider> getAuthenticationStatementProviders()
Get the List of AuthenticationStatementProviders.


setAuthDecisionStatementProviders

public void setAuthDecisionStatementProviders(List<AuthDecisionStatementProvider> authDecisionStatementProviders)
Set the List of AuthDecisionStatementProviders.


getAuthDecisionStatementProviders

public List<AuthDecisionStatementProvider> getAuthDecisionStatementProviders()
Get the List of AuthDecisionStatementProviders.


setSubjectProvider

public void setSubjectProvider(SubjectProvider subjectProvider)
Set the SubjectProvider.


getSubjectProvider

public SubjectProvider getSubjectProvider()
Get the SubjectProvider.


setConditionsProvider

public void setConditionsProvider(ConditionsProvider conditionsProvider)
Set the ConditionsProvider


getConditionsProvider

public ConditionsProvider getConditionsProvider()
Get the ConditionsProvider


isSignToken

public boolean isSignToken()
Return whether the provided token will be signed or not. Default is true.


setSignToken

public void setSignToken(boolean signToken)
Set whether the provided token will be signed or not. Default is true.


setRealmMap

public void setRealmMap(Map<String,SAMLRealm> realms)
Set the map of realm->SAMLRealm for this token provider

Parameters:
realms - the map of realm->SAMLRealm for this token provider

getRealmMap

public Map<String,SAMLRealm> getRealmMap()
Get the map of realm->SAMLRealm for this token provider

Returns:
the map of realm->SAMLRealm for this token provider

setSamlCustomHandler

public void setSamlCustomHandler(SamlCustomHandler samlCustomHandler)

createCallbackHandler

public SamlCallbackHandler createCallbackHandler(TokenProviderParameters tokenParameters,
                                                 byte[] secret,
                                                 SAMLRealm samlRealm,
                                                 Document doc)
                                          throws Exception
Throws:
Exception

Apache CXF API

Apache CXF