public class SecurityTokenFactory extends Object
SecurityTokenFactory
represents a factory class to
create WS-Security tokens.
This class uses pluggable TokenProvider
s to generate the
WS-Security tokens. If the TokenProvider
is
not specified, this class will use the default implementation of the
Token Provider.Modifier | Constructor and Description |
---|---|
protected |
SecurityTokenFactory(TokenProvider provider)
Protected constructor.
|
Modifier and Type | Method and Description |
---|---|
static SecurityTokenFactory |
getInstance(SSOToken credential)
Returns the Security Token factory instance.
|
static SecurityTokenFactory |
getInstance(TokenProvider provider)
Returns the Security Token factory instance.
|
SecurityToken |
getSecurityToken(SecurityTokenSpec tokenSpec)
Returns / Creates a security token from the security token specificaion.
|
TokenProvider |
getTokenProvider()
Returns the provider of this Security Token factory object.
|
protected SecurityTokenFactory(TokenProvider provider)
public static SecurityTokenFactory getInstance(SSOToken credential) throws SecurityException
TokenProvider
is used to generate the
WS-Security tokens.credential
- The credential of the authenticated subject.SecurityException
- if unable to create the
the security token factory.public static SecurityTokenFactory getInstance(TokenProvider provider) throws SecurityException
provider
- the token provider implementation.SecurityException
- if unable to create the
the security token factory.public SecurityToken getSecurityToken(SecurityTokenSpec tokenSpec) throws SecurityException
tokenSpec
- Security Token Specification that is needed to
generate the security tokens.SecurityException
- if the security token could not be
generated.public TokenProvider getTokenProvider()
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.