com.sun.identity.wss.security
Class SecurityTokenFactory

java.lang.Object
  extended bycom.sun.identity.wss.security.SecurityTokenFactory

public class SecurityTokenFactory
extends java.lang.Object

This class SecurityTokenFactory represents a factory class to create WSS Security tokens. This class uses pluggable TokenProviders to generate the WSS security tokens. If the TokenProvider is not specified, this class will use the default implementation of the Token Provider.


Method Summary
static SecurityTokenFactory getInstance(SSOToken credential)
          Returns the security token factory instance.
static SecurityTokenFactory getInstance(com.sun.identity.wss.security.TokenProvider provider)
          Returns the security token factory instance.
 SecurityToken getSecurityToken(SecurityTokenSpec tokenSpec)
          Creates a security token from the security token specificaion.
 com.sun.identity.wss.security.TokenProvider getTokenProvider()
          Returns the provider of this security token factory object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static SecurityTokenFactory getInstance(SSOToken credential)
                                        throws com.sun.identity.wss.security.SecurityException
Returns the security token factory instance. The default TokenProvider is used to generate the WSS security tokens.

Parameters:
credential - The credential of the authenticated subject.
Throws:
java.lang.SecurityException - if unable to create the the security token factory.
com.sun.identity.wss.security.SecurityException

getInstance

public static SecurityTokenFactory getInstance(com.sun.identity.wss.security.TokenProvider provider)
                                        throws com.sun.identity.wss.security.SecurityException
Returns the security token factory instance.

Parameters:
provider - the token provider implementation.
Throws:
java.lang.SecurityException - if unable to create the the security token factory.
com.sun.identity.wss.security.SecurityException

getSecurityToken

public SecurityToken getSecurityToken(SecurityTokenSpec tokenSpec)
                               throws com.sun.identity.wss.security.SecurityException
Creates a security token from the security token specificaion.

Parameters:
tokenSpec - Security Token Specification that is needed to generate the security tokens.
Returns:
SecurityToken the security token.
Throws:
java.lang.SecurityException - if the security token could not be generated.
com.sun.identity.wss.security.SecurityException

getTokenProvider

public com.sun.identity.wss.security.TokenProvider getTokenProvider()
Returns the provider of this security token factory object.

Returns:
the token provider.


Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.