Package com.sun.identity.wss.security
Class SecurityTokenFactory
- java.lang.Object
-
- com.sun.identity.wss.security.SecurityTokenFactory
-
public class SecurityTokenFactory extends Object
This classSecurityTokenFactoryrepresents a factory class to create WS-Security tokens. This class uses pluggableTokenProviders to generate the WS-Security tokens. If theTokenProvideris not specified, this class will use the default implementation of the Token Provider.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSecurityTokenFactory(TokenProvider provider)Protected constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SecurityTokenFactorygetInstance(SSOToken credential)Returns the Security Token factory instance.static SecurityTokenFactorygetInstance(TokenProvider provider)Returns the Security Token factory instance.SecurityTokengetSecurityToken(SecurityTokenSpec tokenSpec)Returns / Creates a security token from the security token specificaion.TokenProvidergetTokenProvider()Returns the provider of this Security Token factory object.
-
-
-
Constructor Detail
-
SecurityTokenFactory
protected SecurityTokenFactory(TokenProvider provider)
Protected constructor.
-
-
Method Detail
-
getInstance
public static SecurityTokenFactory getInstance(SSOToken credential) throws SecurityException
Returns the Security Token factory instance. The defaultTokenProvideris used to generate the WS-Security tokens.- Parameters:
credential- The credential of the authenticated subject.- Throws:
SecurityException- if unable to create the the security token factory.
-
getInstance
public static SecurityTokenFactory getInstance(TokenProvider provider) throws SecurityException
Returns the Security Token factory instance.- Parameters:
provider- the token provider implementation.- Throws:
SecurityException- if unable to create the the security token factory.
-
getSecurityToken
public SecurityToken getSecurityToken(SecurityTokenSpec tokenSpec) throws SecurityException
Returns / 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:
SecurityException- if the security token could not be generated.
-
getTokenProvider
public TokenProvider getTokenProvider()
Returns the provider of this Security Token factory object.- Returns:
- the token provider.
-
-