|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ws.security.message.WSSecBase
org.apache.ws.security.message.WSSecSignatureBase
org.apache.ws.security.message.WSSecDerivedKeyBase
public abstract class WSSecDerivedKeyBase
Base class for DerivedKey encryption and signature
Field Summary | |
---|---|
protected String |
clientLabel
Client's label value |
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 |
protected byte[] |
ephemeralKey
Session key used as the secret in key derivation |
protected String |
serviceLabel
Service's label value |
protected Element |
strElem
The wsse:SecurityTokenReference element to be used |
protected boolean |
tokenIdDirectId
True if the tokenIdentifier is a direct reference to a key identifier instead of a URI to a key |
protected String |
tokenIdentifier
The Token identifier of the token that the DerivedKeyToken
is (or to be) derived from. |
Fields inherited from class org.apache.ws.security.message.WSSecBase |
---|
callbackLookup, doDebug, keyIdentifierType, parts, password, user |
Constructor Summary | |
---|---|
WSSecDerivedKeyBase()
|
|
WSSecDerivedKeyBase(WSSConfig config)
|
Method Summary | |
---|---|
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()
|
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 |
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)
|
Methods inherited from class org.apache.ws.security.message.WSSecSignatureBase |
---|
addReferencesToSign, createSTRParameter, getInclusivePrefixes, getInclusivePrefixes |
Methods inherited from class org.apache.ws.security.message.WSSecBase |
---|
getKeyIdentifierType, getWsConfig, setBodyID, setCallbackLookup, setKeyIdentifierType, setParts, setUserInfo, setWsConfig, setWsuId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Document document
protected byte[] ephemeralKey
protected DerivedKeyToken dkt
protected byte[] derivedKeyBytes
protected String dktId
protected String clientLabel
protected String serviceLabel
protected Element envelope
protected String tokenIdentifier
DerivedKeyToken
is (or to be) derived from.
protected boolean tokenIdDirectId
protected Element strElem
protected int derivedKeyLength
Constructor Detail |
---|
public WSSecDerivedKeyBase()
public WSSecDerivedKeyBase(WSSConfig config)
Method Detail |
---|
protected abstract int getDerivedKeyLength() throws WSSecurityException
WSSecurityException
public 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 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, ConversationException
doc
- The unsigned SOAP envelope as Document
WSSecurityException
ConversationException
public 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 Element getdktElement()
public void setDerivedKeyLength(int keyLength)
public void setCustomValueType(String customValueType)
public void setTokenIdDirectId(boolean b)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |