Class BinarySecurity

java.lang.Object
org.apache.wss4j.common.token.BinarySecurity
Direct Known Subclasses:
PKIPathSecurity, X509Security

public class BinarySecurity extends Object
Binary Security Token.
  • Field Details

    • TOKEN_BST

      public static final QName TOKEN_BST
    • TOKEN_KI

      public static final QName TOKEN_KI
  • Constructor Details

  • Method Details

    • getAttachmentCallbackHandler

      public CallbackHandler getAttachmentCallbackHandler()
    • setAttachmentCallbackHandler

      public void setAttachmentCallbackHandler(CallbackHandler attachmentCallbackHandler)
    • addWSSENamespace

      public void addWSSENamespace()
      Add the WSSE Namespace to this BST. The namespace is not added by default for efficiency purposes.
    • addWSUNamespace

      public void addWSUNamespace()
      Add the WSU Namespace to this BST. The namespace is not added by default for efficiency purposes.
    • getValueType

      public String getValueType()
      get the value type.
      Returns:
      the value type
    • setValueType

      public void setValueType(String type)
      set the value type.
      Parameters:
      type -
    • getEncodingType

      public String getEncodingType()
      get the encoding type.
      Returns:
      the encoding type.
    • setEncodingType

      public void setEncodingType(String encoding)
      set the encoding type.
      Parameters:
      encoding -
    • getToken

      public byte[] getToken()
      get the byte array containing token information.
      Returns:
      the byte array containing token information
    • setToken

      public void setToken(byte[] data) throws WSSecurityException
      set the token information.
      Parameters:
      data -
      Throws:
      WSSecurityException
    • setRawToken

      public void setRawToken(byte[] data)
      Set the raw token data, without Base-64 encoding it into the Element.
    • encodeRawToken

      public void encodeRawToken()
      BASE64-Encode the raw token bytes + store them in a text child node.
    • getElement

      public Element getElement()
      return the dom element.
      Returns:
      the dom element.
    • getID

      public String getID()
      get the id.
      Returns:
      the WSU ID of this element
    • setID

      public void setID(String id)
      set the id.
      Parameters:
      id -
    • toString

      public String toString()
      return the string representation of the token.
      Overrides:
      toString in class Object
      Returns:
      the string representation of the token.
    • hashCode

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

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

      public boolean isStoreBytesInAttachment()
    • setStoreBytesInAttachment

      public void setStoreBytesInAttachment(boolean storeBytesInAttachment)