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 void
addWSUNamespace()
Add the WSU Namespace to this SCT.boolean
equals(Object object)
Element
getElement()
Returns the dom element of thisSecurityContextToken
object.String
getID()
Gets the id.String
getIdentifier()
Get the identifier.String
getInstance()
Get the instance.String
getTokenType()
Get the WS-Trust tokenType String associated with this tokenint
hashCode()
void
setElement(Element elem)
void
setID(String id)
Set the id of this security context token.void
setIdentifier(String uuid)
Set the identifier.String
toString()
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 WSSecurityException
Constructor to create the SCT- Parameters:
doc
-- Throws:
WSSecurityException
-
SecurityContextToken
public SecurityContextToken(int version, 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, String uuid, String instance) throws WSSecurityException
Constructor 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 thisSecurityContextToken
object.- Returns:
- the
wsse:SecurityContextToken
element
-
toString
public String toString()
Returns the string representation of the token.
-
getID
public String getID()
Gets the id.- Returns:
- the value of the
wsu:Id
attribute of this SecurityContextToken
-
setID
public void setID(String id)
Set the id of this security context token.- Parameters:
id
- the value for thewsu:Id
attribute of this SecurityContextToken
-
-