public abstract class WSSecDerivedKeyBase extends WSSecSignatureBase
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
derivedKeyBytes
Raw bytes of the derived key
|
protected int |
derivedKeyLength |
protected DerivedKeyToken |
dkt
DerivedKeyToken of this builder
|
protected String |
dktId
wsu:Id of the wsc:DerivedKeyToken
|
protected Document |
document |
protected Element |
envelope
soap:Envelope element
|
attachmentCallbackHandler, callbackLookup, doDebug, keyIdentifierType, parts, password, storeBytesInAttachment, user| Constructor and Description |
|---|
WSSecDerivedKeyBase() |
WSSecDerivedKeyBase(WSSConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendDKElementToHeader(WSSecHeader secHeader) |
protected abstract int |
getDerivedKeyLength()
The derived key will change depending on the sig/encr algorithm.
|
Element |
getdktElement() |
String |
getId()
Get the id generated during
prepare(). |
String |
getTokenIdentifier() |
int |
getWscVersion() |
void |
prepare(Document doc)
Initialize a WSSec Derived key.
|
void |
prependDKElementToHeader(WSSecHeader secHeader)
Prepend the DerivedKey element to the elements already in the Security
header.
|
void |
setClientLabel(String clientLabel)
Set the label value of the client.
|
void |
setCrypto(Crypto crypto) |
void |
setCustomValueType(String customValueType) |
void |
setDerivedKeyLength(int keyLength) |
void |
setExternalKey(byte[] ephemeralKey,
Element strElem) |
void |
setExternalKey(byte[] ephemeralKey,
String tokenIdentifier) |
void |
setServiceLabel(String serviceLabel)
Set the label value of the service.
|
void |
setTokenIdDirectId(boolean b) |
void |
setWscVersion(int wscVersion) |
void |
setX509Certificate(X509Certificate cer)
Set the X509 Certificate to use
|
addReferencesToSign, createSTRParameter, getInclusivePrefixes, getInclusivePrefixesgetKeyIdentifierType, getWsConfig, setAttachmentCallbackHandler, setBodyID, setCallbackLookup, setKeyIdentifierType, setParts, setStoreBytesInAttachment, setUserInfo, setWsConfig, setWsuIdprotected Document document
protected DerivedKeyToken dkt
protected byte[] derivedKeyBytes
protected String dktId
protected Element envelope
protected int derivedKeyLength
public WSSecDerivedKeyBase()
public WSSecDerivedKeyBase(WSSConfig config)
protected abstract int getDerivedKeyLength()
throws WSSecurityException
WSSecurityExceptionpublic void setExternalKey(byte[] ephemeralKey,
String tokenIdentifier)
ephemeralKey - The ephemeralKey to set.public void setExternalKey(byte[] ephemeralKey,
Element strElem)
ephemeralKey - The ephemeralKey to set.public String getTokenIdentifier()
public void setX509Certificate(X509Certificate cer)
cer - the X509 Certificate to usepublic String getId()
prepare().
Returns the the value of wsu:Id attribute of the DerivedKeyToken element.prepare()
was not called before.public void setClientLabel(String clientLabel)
clientLabel - public void setServiceLabel(String serviceLabel)
serviceLabel - public void prepare(Document doc) throws WSSecurityException
doc - The unsigned SOAP envelope as DocumentWSSecurityExceptionpublic void prependDKElementToHeader(WSSecHeader secHeader)
prepare(). This
allows to insert the DerivedKey element at any position in the Security
header.secHeader - The security header that holds the Signature element.public void appendDKElementToHeader(WSSecHeader secHeader)
public void setWscVersion(int wscVersion)
wscVersion - The wscVersion to set.public int getWscVersion()
public Element getdktElement()
public void setDerivedKeyLength(int keyLength)
public void setCustomValueType(String customValueType)
public void setTokenIdDirectId(boolean b)
public void setCrypto(Crypto crypto)
Copyright © 2004–2016 The Apache Software Foundation. All rights reserved.