org.apache.ws.security.message.token
Class BinarySecurity

java.lang.Object
  extended by org.apache.ws.security.message.token.BinarySecurity
Direct Known Subclasses:
KerberosSecurity, PKIPathSecurity, X509Security

public class BinarySecurity
extends java.lang.Object

Binary Security Token.

Author:
Davanum Srinivas ([email protected])., Werner Dittmann ([email protected]).

Field Summary
static java.lang.String BASE64_ENCODING
           
protected  org.w3c.dom.Element element
           
static javax.xml.namespace.QName TOKEN_BST
           
static javax.xml.namespace.QName TOKEN_KI
           
 
Constructor Summary
BinarySecurity(javax.security.auth.callback.CallbackHandler callbackHandler)
          Create a BinarySecurityToken via a CallbackHandler
BinarySecurity(org.w3c.dom.Document doc)
          Constructor.
BinarySecurity(org.w3c.dom.Element elem)
          Constructor.
BinarySecurity(org.w3c.dom.Element elem, boolean bspCompliant)
          Constructor.
 
Method Summary
 void addWSSENamespace()
          Add the WSSE Namespace to this BST.
 void addWSUNamespace()
          Add the WSU Namespace to this BST.
 boolean equals(java.lang.Object object)
           
 org.w3c.dom.Element getElement()
          return the dom element.
 java.lang.String getEncodingType()
          get the encoding type.
protected  org.w3c.dom.Text getFirstNode()
          return the first text node.
 java.lang.String getID()
          get the id.
 byte[] getToken()
          get the byte array containing token information.
 java.lang.String getValueType()
          get the value type.
 int hashCode()
           
 void setEncodingType(java.lang.String encoding)
          set the encoding type.
 void setID(java.lang.String id)
          set the id.
 void setToken(byte[] data)
          set the token information.
 void setValueType(java.lang.String type)
          set the value type.
 java.lang.String toString()
          return the string representation of the token.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TOKEN_BST

public static final javax.xml.namespace.QName TOKEN_BST

TOKEN_KI

public static final javax.xml.namespace.QName TOKEN_KI

BASE64_ENCODING

public static final java.lang.String BASE64_ENCODING
See Also:
Constant Field Values

element

protected org.w3c.dom.Element element
Constructor Detail

BinarySecurity

public BinarySecurity(org.w3c.dom.Element elem)
               throws WSSecurityException
Constructor.

Parameters:
elem - The BinarySecurityToken element to process
Throws:
WSSecurityException

BinarySecurity

public BinarySecurity(org.w3c.dom.Element elem,
                      boolean bspCompliant)
               throws WSSecurityException
Constructor.

Parameters:
elem - The BinarySecurityToken element to process
bspCompliant - whether the processing conforms to the BSP spec
Throws:
WSSecurityException

BinarySecurity

public BinarySecurity(org.w3c.dom.Document doc)
Constructor.

Parameters:
doc -

BinarySecurity

public BinarySecurity(javax.security.auth.callback.CallbackHandler callbackHandler)
               throws WSSecurityException
Create a BinarySecurityToken via a CallbackHandler

Parameters:
callbackHandler -
Throws:
WSSecurityException
Method Detail

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 java.lang.String getValueType()
get the value type.

Returns:
the value type

setValueType

public void setValueType(java.lang.String type)
set the value type.

Parameters:
type -

getEncodingType

public java.lang.String getEncodingType()
get the encoding type.

Returns:
TODO

setEncodingType

public void setEncodingType(java.lang.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)
set the token information.

Parameters:
data -

getFirstNode

protected org.w3c.dom.Text getFirstNode()
return the first text node.

Returns:
TODO

getElement

public org.w3c.dom.Element getElement()
return the dom element.

Returns:
TODO

getID

public java.lang.String getID()
get the id.

Returns:
the WSU ID of this element

setID

public void setID(java.lang.String id)
set the id.

Parameters:
id -

toString

public java.lang.String toString()
return the string representation of the token.

Overrides:
toString in class java.lang.Object
Returns:
the string representation of the token.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object


Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.