public abstract class TokenBuilder extends Object implements TokenBuilder
| Modifier and Type | Field and Description |
|---|---|
protected JAXBFilterProcessingContext |
context |
protected WSSElementFactory |
elementFactory |
protected KeyInfo |
keyInfo |
protected static Logger |
logger |
protected SecurityHeader |
securityHeader |
| Constructor and Description |
|---|
TokenBuilder(JAXBFilterProcessingContext context)
Creates a new instance of TokenBuilder
|
| Modifier and Type | Method and Description |
|---|---|
protected DirectReference |
buildDirectReference(String id,
String valueType)
builds the direct reference and sets the id and valueType in it
|
protected KeyInfo |
buildKeyInfo(PublicKey pubKey)
builds key value with the public key provided
Uses thid key value to construct key info
|
protected KeyInfo |
buildKeyInfo(Reference ref,
String strId)
builds SecurityTokenReference with the reference element provided and with the id.
|
protected KeyInfo |
buildKeyInfo(SecurityTokenReference str)
creates key info with the SecurityTokenReference provided
|
protected KeyIdentifier |
buildKeyInfoWithEKSHA1(String ekSHA1Ref)
builds keyInfo with the given encrypted key sha1 reference
|
protected KeyIdentifier |
buildKeyInfoWithKI(AuthenticationTokenPolicy.X509CertificateBinding binding,
String refType)
builds keyInfo with the given X509 certificate binding
|
protected KeyIdentifier |
buildKeyInfoWithKIKerberos(AuthenticationTokenPolicy.KerberosTokenBinding binding,
String refType)
builds keyInfo with the given kerberos token binding
|
protected KeyValue |
buildKeyValue(PublicKey pubKey)
builds RSA key value with the public key provided
|
protected KeyInfo |
buildKIWithKeyName(String name) |
protected SecurityTokenReference |
buildSTR(Reference ref)
creates a new SecurityTokenReference with the reference element provided
|
protected SecurityTokenReference |
buildSTR(String strId,
Reference ref)
creates a new SecurityTokenReference with the reference element provided
sets the id provided in the SecurityTokenReference if the security policy is a SignaturePolicy
|
protected BinarySecurityToken |
createBinarySecurityToken(AuthenticationTokenPolicy.X509CertificateBinding binding,
X509Certificate x509Cert)
if a BinarySecurityToken already exists in the security header with the id of the binding
returns it else creates a BinarySecurityToken with the X509 certificate provided
Adds the username token to the security header
|
protected BinarySecurityToken |
createKerberosBST(AuthenticationTokenPolicy.KerberosTokenBinding binding,
byte[] kerbToken)
if an BinarySecurityToken already exists in the security header with the id of the binding
returns it else creates a new BinarySecurityToken with the kerboros token provided
Adds the BinarySecurityToken to the security header
|
protected UsernameToken |
createUsernameToken(AuthenticationTokenPolicy.UsernameTokenBinding binding,
UsernameToken unToken)
if an UsernameToken already exists in the security header with the id of the binding
returns it else sets the id of the binding in the usernametoken provided and returns it
Adds the username token to the security header
|
protected String |
getID(WSSPolicy policy) |
KeyInfo |
getKeyInfo() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocessprotected static final Logger logger
protected JAXBFilterProcessingContext context
protected SecurityHeader securityHeader
protected WSSElementFactory elementFactory
protected KeyInfo keyInfo
public TokenBuilder(JAXBFilterProcessingContext context)
protected BinarySecurityToken createBinarySecurityToken(AuthenticationTokenPolicy.X509CertificateBinding binding, X509Certificate x509Cert) throws XWSSecurityException
binding - X509CertificateBindingx509Cert - X509CertificateXWSSecurityExceptionprotected UsernameToken createUsernameToken(AuthenticationTokenPolicy.UsernameTokenBinding binding, UsernameToken unToken) throws XWSSecurityException
binding - UsernameTokenBindingunToken - UsernameTokenXWSSecurityExceptionprotected BinarySecurityToken createKerberosBST(AuthenticationTokenPolicy.KerberosTokenBinding binding, byte[] kerbToken) throws XWSSecurityException
binding - KerberosTokenBindingkerbToken - byte[]XWSSecurityExceptionprotected SecurityTokenReference buildSTR(String strId, Reference ref)
strId - Stringref - Referenceprotected SecurityTokenReference buildSTR(Reference ref)
ref - Referenceprotected KeyInfo buildKeyInfo(Reference ref, String strId)
ref - ReferencstrId - Stringprotected KeyInfo buildKeyInfo(SecurityTokenReference str)
str - SecurityTokenReferenceprotected KeyInfo buildKeyInfo(PublicKey pubKey)
pubKey - PublicKeyprotected KeyValue buildKeyValue(PublicKey pubKey)
pubKey - PublicKeyprotected DirectReference buildDirectReference(String id, String valueType)
id - StringvalueType - Stringprotected KeyIdentifier buildKeyInfoWithKI(AuthenticationTokenPolicy.X509CertificateBinding binding, String refType) throws XWSSecurityException
binding - X509CertificateBindingrefType - StringXWSSecurityExceptionprotected KeyIdentifier buildKeyInfoWithKIKerberos(AuthenticationTokenPolicy.KerberosTokenBinding binding, String refType) throws XWSSecurityException
binding - KerberosTokenBindingrefType - StringXWSSecurityExceptionprotected KeyIdentifier buildKeyInfoWithEKSHA1(String ekSHA1Ref)
ekSHA1Ref - Stringpublic KeyInfo getKeyInfo()
Copyright © 2005–2018 Oracle Corporation. All rights reserved.