|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wss4j.dom.message.token.DerivedKeyToken
public class DerivedKeyToken
| Constructor Summary | |
|---|---|
DerivedKeyToken(Document doc)
This will create an empty DerivedKeyToken |
|
DerivedKeyToken(Element elem,
BSPEnforcer bspEnforcer)
This will create a DerivedKeyToken object with the given DerivedKeyToken element |
|
DerivedKeyToken(int version,
Document doc)
This will create an empty DerivedKeyToken |
|
| Method Summary | |
|---|---|
void |
addWSUNamespace()
Add the WSU Namespace to this DKT. |
Principal |
createPrincipal()
Create a WSDerivedKeyTokenPrincipal from this DerivedKeyToken object |
byte[] |
deriveKey(int length,
byte[] secret)
Derive a key from this DerivedKeyToken instance |
boolean |
equals(Object object)
|
String |
getAlgorithm()
Gets the derivation algorithm |
Element |
getElement()
Returns the dom element of this SecurityContextToken object. |
int |
getGeneration()
|
String |
getID()
Gets the id. |
String |
getLabel()
Returns the label of the derived key token |
int |
getLength()
|
String |
getNonce()
Return the nonce of the derived key token |
int |
getOffset()
|
Map<String,String> |
getProperties()
|
SecurityTokenReference |
getSecurityTokenReference()
Returns the SecurityTokenReference of the derived key token |
Element |
getSecurityTokenReferenceElement()
Returns the SecurityTokenReference element of the derived key token |
int |
hashCode()
|
void |
setAlgorithm(String algo)
Set the derivation algorithm of this derived key token. |
void |
setGeneration(int generation)
Sets the generation of the derived key |
void |
setID(String id)
Set the id of this derived key token. |
void |
setLabel(String label)
Sets the label of the derived key |
void |
setLength(int length)
Sets the length of the derived key |
void |
setNonce(String nonce)
Sets the nonce value of the derived key |
void |
setOffset(int offset)
Sets the offset |
void |
setProperties(Map<String,String> properties)
If there are other types of properties other than Name, Label and Nonce This is provided for extensibility purposes |
void |
setProperties(String name,
String label,
String nonce)
This is used to set the Name, Label and Nonce element values in the properties element At this point I'm not sure if these are the only properties that will appear in the Properties element. |
void |
setSecurityTokenReference(Element elem)
|
void |
setSecurityTokenReference(SecurityTokenReference ref)
Sets the security token reference of the derived key token This is the reference to the shared secret used in the conversation/context |
String |
toString()
Returns the string representation of the token. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DerivedKeyToken(Document doc)
throws WSSecurityException
doc - The DOM document
WSSecurityException
public DerivedKeyToken(int version,
Document doc)
throws WSSecurityException
doc - The DOM document
WSSecurityException
public DerivedKeyToken(Element elem,
BSPEnforcer bspEnforcer)
throws WSSecurityException
elem - The DerivedKeyToken DOM elementbspEnforcer - a BSPEnforcer instance to enforce BSP rules
WSSecurityException - If the element is not a derived key token| Method Detail |
|---|
public void addWSUNamespace()
public void setSecurityTokenReference(SecurityTokenReference ref)
ref - Security token referencepublic void setSecurityTokenReference(Element elem)
public SecurityTokenReference getSecurityTokenReference()
throws WSSecurityException
WSSecurityExceptionpublic Element getSecurityTokenReferenceElement()
public void setProperties(String name,
String label,
String nonce)
Properties element. There fore this method is provided
If this is not required feel free to remove this :D
name - Value of the Properties/Name elementlabel - Value of the Properties/Label elementnonce - Value of the Properties/Nonce elementpublic void setProperties(Map<String,String> properties)
properties - The properties and values in a Mappublic Map<String,String> getProperties()
public void setLength(int length)
length - The length of the derived key as a longpublic int getLength()
public void setOffset(int offset)
throws WSSecurityException
offset - The offset value as an integer
WSSecurityExceptionpublic int getOffset()
public void setGeneration(int generation)
throws WSSecurityException
generation - generation value as an integer
WSSecurityExceptionpublic int getGeneration()
public void setLabel(String label)
label - Label value as a stringpublic void setNonce(String nonce)
nonce - Nonce value as a stringpublic String getLabel()
public String getNonce()
public Element getElement()
SecurityContextToken object.
public String toString()
toString in class Objectpublic String getID()
wsu:Id attribute of this
DerivedKeyTokenpublic void setID(String id)
id - the value for the wsu:Id attribute of this
DerivedKeyTokenpublic String getAlgorithm()
wsc:Algorithm attribute of this
DerivedKeyToken
public Principal createPrincipal()
throws WSSecurityException
WSSecurityExceptionpublic void setAlgorithm(String algo)
algo - the value for the Algorithm attribute of this
DerivedKeyToken
public byte[] deriveKey(int length,
byte[] secret)
throws WSSecurityException
length - secret -
WSSecurityExceptionpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object object)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||