Class SecurityContextToken

java.lang.Object
org.apache.wss4j.dom.message.token.SecurityContextToken

public class SecurityContextToken extends Object
  • Constructor Details

    • SecurityContextToken

      public SecurityContextToken(Document doc) throws org.apache.wss4j.common.ext.WSSecurityException
      Constructor to create the SCT
      Parameters:
      doc -
      Throws:
      org.apache.wss4j.common.ext.WSSecurityException
    • SecurityContextToken

      public SecurityContextToken(Document doc, String uuid) throws org.apache.wss4j.common.ext.WSSecurityException
      Constructor to create the SCT with a given uuid
      Parameters:
      doc -
      Throws:
      org.apache.wss4j.common.ext.WSSecurityException
    • SecurityContextToken

      public SecurityContextToken(int version, Document doc) throws org.apache.wss4j.common.ext.WSSecurityException
      Constructor to create the SCT
      Parameters:
      doc -
      Throws:
      org.apache.wss4j.common.ext.WSSecurityException
    • SecurityContextToken

      public SecurityContextToken(int version, Document doc, String uuid) throws org.apache.wss4j.common.ext.WSSecurityException
      Constructor to create the SCT with a given uuid
      Parameters:
      doc -
      Throws:
      org.apache.wss4j.common.ext.WSSecurityException
    • SecurityContextToken

      public SecurityContextToken(int version, Document doc, String uuid, String instance) throws org.apache.wss4j.common.ext.WSSecurityException
      Constructor to create the SCT with a given uuid and instance
      Parameters:
      doc -
      Throws:
      org.apache.wss4j.common.ext.WSSecurityException
    • SecurityContextToken

      public SecurityContextToken(Element elem) throws org.apache.wss4j.common.ext.WSSecurityException
      This is used to create a SecurityContextToken using a DOM Element
      Parameters:
      elem - The DOM element: The security context token
      Throws:
      org.apache.wss4j.common.ext.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

      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 this SecurityContextToken object.
      Returns:
      the wsse:SecurityContextToken element
    • toString

      public String toString()
      Returns the string representation of the token.
      Overrides:
      toString in class Object
      Returns:
      a XML string representation
    • 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 the wsu:Id attribute of this SecurityContextToken
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object