Class SecurityContextToken

java.lang.Object
org.apache.ws.security.message.token.SecurityContextToken

public class SecurityContextToken extends Object
Version:
1.0
Author:
Ruchith Fernando
  • Field Details

    • element

      protected Element element
      Security context token element
    • elementIdentifier

      protected Element elementIdentifier
      Identifier element
  • Constructor Details

    • SecurityContextToken

      public SecurityContextToken(Document doc) throws org.apache.ws.security.conversation.ConversationException
      Constructor to create the SCT
      Parameters:
      doc -
      Throws:
      org.apache.ws.security.conversation.ConversationException
    • SecurityContextToken

      public SecurityContextToken(Document doc, String uuid) throws org.apache.ws.security.conversation.ConversationException
      Constructor to create the SCT with a given uuid
      Parameters:
      doc -
      Throws:
      org.apache.ws.security.conversation.ConversationException
    • SecurityContextToken

      public SecurityContextToken(int version, Document doc) throws org.apache.ws.security.conversation.ConversationException
      Constructor to create the SCT
      Parameters:
      doc -
      Throws:
      org.apache.ws.security.conversation.ConversationException
    • SecurityContextToken

      public SecurityContextToken(int version, Document doc, String uuid) throws org.apache.ws.security.conversation.ConversationException
      Constructor to create the SCT with a given uuid
      Parameters:
      doc -
      Throws:
      org.apache.ws.security.conversation.ConversationException
    • SecurityContextToken

      public SecurityContextToken(Element elem) throws WSSecurityException
      This is used to create a SecurityContestToken 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

    • setIdentifier

      public void setIdentifier(Document doc, String uuid)
      Set the identifier.
      Parameters:
      name - sets a text node containing the identifier into the identifier element.
    • getIdentifier

      public String getIdentifier()
      Get the identifier.
      Returns:
      the data from the identifier element.
    • setElement

      public void setElement(Element elem)
    • getElement

      public Element getElement()
      Returns the dom element of this SecurityContextToken object.
      Returns:
      the wsse:UsernameToken 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