Class SecurityContextToken
- java.lang.Object
-
- org.apache.wss4j.dom.message.token.SecurityContextToken
-
public class SecurityContextToken extends Object
-
-
Constructor Summary
Constructors Constructor Description SecurityContextToken(int version, Document doc)Constructor to create the SCTSecurityContextToken(int version, Document doc, String uuid)Constructor to create the SCT with a given uuidSecurityContextToken(int version, Document doc, String uuid, String instance)Constructor to create the SCT with a given uuid and instanceSecurityContextToken(Document doc)Constructor to create the SCTSecurityContextToken(Document doc, String uuid)Constructor to create the SCT with a given uuidSecurityContextToken(Element elem)This is used to create a SecurityContextToken using a DOM Element
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddWSUNamespace()Add the WSU Namespace to this SCT.booleanequals(Object object)ElementgetElement()Returns the dom element of thisSecurityContextTokenobject.StringgetID()Gets the id.StringgetIdentifier()Get the identifier.StringgetInstance()Get the instance.StringgetTokenType()Get the WS-Trust tokenType String associated with this tokeninthashCode()voidsetElement(Element elem)voidsetID(String id)Set the id of this security context token.voidsetIdentifier(String uuid)Set the identifier.StringtoString()Returns the string representation of the token.
-
-
-
Constructor Detail
-
SecurityContextToken
public SecurityContextToken(Document doc) throws WSSecurityException
Constructor to create the SCT- Parameters:
doc-- Throws:
WSSecurityException
-
SecurityContextToken
public SecurityContextToken(Document doc, String uuid) throws WSSecurityException
Constructor to create the SCT with a given uuid- Parameters:
doc-- Throws:
WSSecurityException
-
SecurityContextToken
public SecurityContextToken(int version, Document doc) throws WSSecurityExceptionConstructor to create the SCT- Parameters:
doc-- Throws:
WSSecurityException
-
SecurityContextToken
public SecurityContextToken(int version, Document doc, String uuid) throws WSSecurityExceptionConstructor to create the SCT with a given uuid- Parameters:
doc-- Throws:
WSSecurityException
-
SecurityContextToken
public SecurityContextToken(int version, Document doc, String uuid, String instance) throws WSSecurityExceptionConstructor to create the SCT with a given uuid and instance- Parameters:
doc-- Throws:
WSSecurityException
-
SecurityContextToken
public SecurityContextToken(Element elem) throws WSSecurityException
This is used to create a SecurityContextToken using a DOM Element- Parameters:
elem- The DOM element: The security context token- Throws:
WSSecurityException- If the element passed in in not a security context token
-
-
Method Detail
-
addWSUNamespace
public void addWSUNamespace()
Add the WSU Namespace to this SCT. The namespace is not added by default for efficiency purposes.
-
setIdentifier
public void setIdentifier(String uuid)
Set the identifier.
-
getIdentifier
public String getIdentifier()
Get the identifier.- Returns:
- the data from the identifier element.
-
getInstance
public String getInstance()
Get the instance.- Returns:
- the data from the instance element.
-
getTokenType
public String getTokenType()
Get the WS-Trust tokenType String associated with this token
-
setElement
public void setElement(Element elem)
-
getElement
public Element getElement()
Returns the dom element of thisSecurityContextTokenobject.- Returns:
- the
wsse:SecurityContextTokenelement
-
toString
public String toString()
Returns the string representation of the token.
-
getID
public String getID()
Gets the id.- Returns:
- the value of the
wsu:Idattribute of this SecurityContextToken
-
setID
public void setID(String id)
Set the id of this security context token.- Parameters:
id- the value for thewsu:Idattribute of this SecurityContextToken
-
-