com.rsa.swsj.profiles.wss
Class Token

java.lang.Object
  extended bycom.rsa.swsj.profiles.wss.Token
Direct Known Subclasses:
UsernameToken, X509Token

public abstract class Token
extends java.lang.Object

A Security Token is used to carry Key Information. This abstract class is the base class for X509Token and UsernameToken that hold Token security objects defined in the WS-Security specification.


Constructor Summary
Token(SWSJContext context)

Creates an empty Token object that is initialized only with a context.

 
Method Summary

 SWSJContext

getContext()

Gets the SWSJContext, that is used to carry a number of common parameters and state variables.

 java.lang.String

getId()

Gets the Identifier value.

 java.lang.String

getNamespacePrefix()

Returns the XML namespace prefix of the Token element as a String object.

 void

setId(java.lang.String id)

Sets the Identifier value.

 void

setNamespacePrefix(java.lang.String prefix)

Sets the XML namespace prefix of this Token element to prefix.

 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Token

public Token(SWSJContext context)
      throws InvalidParameterException
Creates an empty Token object that is initialized only with a context.

Parameters:
context - An object that collects a number of common parameters and state variables; for example, JCE provider.
Throws:
InvalidParameterException - If context is invalid.
Method Detail

getContext

public SWSJContext getContext()
Gets the SWSJContext, that is used to carry a number of common parameters and state variables.

Returns:
An object that collects a number of common parameters and state variables; for example, JCE provider.

getId

public java.lang.String getId()
Gets the Identifier value.

Returns:
The Identifier value.

setId

public void setId(java.lang.String id)
           throws InvalidParameterException
Sets the Identifier value.

Note: It is the user's responsibility not to duplicate ID values in XML and WSS documents to which security will be added.

Parameters:
id - A String object that specifies the identifier value.
Throws:
InvalidParameterException - If an invalid value is set.

setNamespacePrefix

public void setNamespacePrefix(java.lang.String prefix)
Sets the XML namespace prefix of this Token element to prefix.

Parameters:
prefix - A String holding the prefix to set.

getNamespacePrefix

public java.lang.String getNamespacePrefix()
Returns the XML namespace prefix of the Token element as a String object.

Returns:
The prefix of this Token element as a String object.