Class SecurityContextToken

java.lang.Object
com.sun.xml.ws.security.secconv.impl.bindings.SecurityContextTokenType
com.sun.xml.ws.security.opt.impl.keyinfo.SecurityContextToken
All Implemented Interfaces:
SecurityElement, SecurityElementWriter, SecurityHeaderElement, com.sun.xml.ws.security.SecurityContextToken, com.sun.xml.ws.security.Token

public class SecurityContextToken extends SecurityContextTokenType implements SecurityHeaderElement, SecurityElementWriter, com.sun.xml.ws.security.SecurityContextToken
SecurityContextToken Implementation
Author:
Manveen Kaur manveen.kaur@sun.com, K.Venugopal@sun.com
  • Field Details

  • Constructor Details

    • SecurityContextToken

      public SecurityContextToken(URI identifier, String instance, String wsuId, com.sun.xml.ws.api.SOAPVersion sv)
    • SecurityContextToken

      public SecurityContextToken(SecurityContextTokenType sTokenType, com.sun.xml.ws.api.SOAPVersion sv)
  • Method Details

    • getIdentifier

      public URI getIdentifier()
      Specified by:
      getIdentifier in interface com.sun.xml.ws.security.SecurityContextToken
    • setIdentifier

      public void setIdentifier(URI identifier)
    • getInstance

      public String getInstance()
      Specified by:
      getInstance in interface com.sun.xml.ws.security.SecurityContextToken
    • setInstance

      public void setInstance(String instance)
    • setWsuId

      public void setWsuId(String wsuId)
    • getWsuId

      public String getWsuId()
      Specified by:
      getWsuId in interface com.sun.xml.ws.security.SecurityContextToken
    • getType

      public String getType()
      Specified by:
      getType in interface com.sun.xml.ws.security.Token
    • getTokenValue

      public Object getTokenValue()
      Specified by:
      getTokenValue in interface com.sun.xml.ws.security.Token
    • getExtElements

      public List getExtElements()
      Specified by:
      getExtElements in interface com.sun.xml.ws.security.SecurityContextToken
    • getNamespaceURI

      public String getNamespaceURI()
      Specified by:
      getNamespaceURI in interface SecurityElement
      Returns:
      namespace uri of the security header element.
    • getLocalPart

      public String getLocalPart()
      Description copied from interface: SecurityElement
      Gets the local name of this header element.
      Specified by:
      getLocalPart in interface SecurityElement
      Returns:
      this string must be interned.
    • getAttribute

      public String getAttribute(String nsUri, String localName)
    • getAttribute

      public String getAttribute(QName name)
    • readHeader

      public XMLStreamReader readHeader() throws XMLStreamException
      Description copied from interface: SecurityElement
      Reads the header as a XMLStreamReader.

      The returned parser points at the start element of this header. (IOW, XMLStreamReader.getEventType() would return XMLStreamConstants.START_ELEMENT.

      Performance Expectation

      For some Header implementations, this operation is a non-trivial operation. Therefore, use of this method is discouraged unless the caller is interested in reading the whole header.

      Similarly, if the caller wants to use this method only to do the API conversion (such as simply firing SAX events from XMLStreamReader), then the JAX-WS team requests that you talk to us.

      Messages that come from tranport usually provides a reasonably efficient implementation of this method.

      Specified by:
      readHeader in interface SecurityElement
      Returns:
      must not null.
      Throws:
      XMLStreamException
    • writeTo

      public void writeTo(OutputStream os)
      Specified by:
      writeTo in interface SecurityElementWriter
    • writeTo

      public void writeTo(XMLStreamWriter streamWriter) throws XMLStreamException
      writes the SecurityContextToken to the XMLStreamWriter
      Specified by:
      writeTo in interface SecurityElementWriter
      Parameters:
      streamWriter -
      Throws:
      XMLStreamException
    • canonicalize

      public byte[] canonicalize(String algorithm, List<AttributeNS> namespaceDecls)
    • isCanonicalized

      public boolean isCanonicalized()
    • refersToSecHdrWithId

      public boolean refersToSecHdrWithId(String id)
      Specified by:
      refersToSecHdrWithId in interface SecurityHeaderElement
      Returns:
    • writeTo

      public void writeTo(XMLStreamWriter streamWriter, HashMap props) throws XMLStreamException
      writes the SecurityContextToken to the XMLStreamWriter
      Specified by:
      writeTo in interface SecurityElementWriter
      Parameters:
      streamWriter -
      props -
      Throws:
      XMLStreamException