Class SecurityContextToken
java.lang.Object
org.apache.wss4j.dom.message.token.SecurityContextToken
-
Constructor Summary
ConstructorsConstructorDescriptionSecurityContextToken(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 instanceConstructor 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
Modifier and TypeMethodDescriptionvoidAdd the WSU Namespace to this SCT.booleanReturns the dom element of thisSecurityContextTokenobject.getID()Gets the id.Get the identifier.Get the instance.Get the WS-Trust tokenType String associated with this tokeninthashCode()voidsetElement(Element elem) voidSet the id of this security context token.voidsetIdentifier(String uuid) Set the identifier.toString()Returns the string representation of the token.
-
Constructor Details
-
SecurityContextToken
Constructor to create the SCT- Parameters:
doc-- Throws:
WSSecurityException
-
SecurityContextToken
Constructor to create the SCT with a given uuid- Parameters:
doc-- Throws:
WSSecurityException
-
SecurityContextToken
Constructor to create the SCT- Parameters:
doc-- Throws:
WSSecurityException
-
SecurityContextToken
Constructor to create the SCT with a given uuid- Parameters:
doc-- Throws:
WSSecurityException
-
SecurityContextToken
public SecurityContextToken(int version, Document doc, String uuid, String instance) throws WSSecurityException Constructor to create the SCT with a given uuid and instance- Parameters:
doc-- Throws:
WSSecurityException
-
SecurityContextToken
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 Details
-
addWSUNamespace
public void addWSUNamespace()Add the WSU Namespace to this SCT. The namespace is not added by default for efficiency purposes. -
setIdentifier
Set the identifier. -
getIdentifier
Get the identifier.- Returns:
- the data from the identifier element.
-
getInstance
Get the instance.- Returns:
- the data from the instance element.
-
getTokenType
Get the WS-Trust tokenType String associated with this token -
setElement
-
getElement
Returns the dom element of thisSecurityContextTokenobject.- Returns:
- the
wsse:SecurityContextTokenelement
-
toString
Returns the string representation of the token. -
getID
Gets the id.- Returns:
- the value of the
wsu:Idattribute of this SecurityContextToken
-
setID
Set the id of this security context token.- Parameters:
id- the value for thewsu:Idattribute of this SecurityContextToken
-
hashCode
public int hashCode() -
equals
-