com.ibm.wsspi.wssecurity.auth.token
Interface Token

All Superinterfaces:
java.lang.Cloneable, com.ibm.wsspi.security.token.PropagationToken, com.ibm.wsspi.security.token.Token
All Known Implementing Classes:
WSSToken

public interface Token
extends com.ibm.wsspi.security.token.PropagationToken

This interface wraps the PropagationToken interface in WebSphere for WS-Security use.

See Also:
PropagationToken

Method Summary
 boolean getCallerChecked()
          Returns if the caller check has been done or not.
 org.w3c.dom.Element getElement()
          Returns DOM expression of the token.
 SoapSecurityException getError()
          Returns the error that occurs during token processing.
 java.lang.String getId()
          Returns id string of this token.
 java.lang.String getKeyInfoType()
          Returns the KeyInfo's type.
 javax.xml.namespace.QName getType()
          Returns the value type of the token in the form of a QName object.
 TokenConsumerConfig getUsedTokenConsumer()
          Returns the configuration of token consumer.
 TokenGeneratorConfig getUsedTokenGenerator()
          Returns the configuration of token generator.
 boolean getUsedToLogin()
          Checks whether the token is used to login or not.
 boolean isProcessed()
          Returns if the token is processed or not.
 boolean isReferenced()
          Returns if the token is referenced in the message or not.
 boolean isTrusted()
          Returns auth required flag.
 void setCallerChecked(boolean isCallerChecked)
          Sets the whether the caller check has been done or not.
 void setElement(org.w3c.dom.Element elem)
          Sets DOM expression of the token.
 void setError(SoapSecurityException error)
          Sets the error that occurs during token processing.
 void setId(java.lang.String tid)
          Sets id string of this token.
 void setKeyInfoType(java.lang.String keyInfoType)
          Sets the KeyInfo's type.
 void setProcessed(boolean isProcessed)
          Sets if the token is processed or not.
 void setReferenced(boolean isReferenced)
          Sets whether the token is referenced in the message or not.
 void setTrusted(boolean trusted)
          Sets auth required flag.
 void setType(javax.xml.namespace.QName type)
          Sets the value type of the token in the form of a QName object.
 void setType(java.lang.String uri, java.lang.String localName)
          Sets the value type of the token by a URI -- local name pair (i.e., qname).
 void setUsedTokenConsumer(TokenConsumerConfig usedConfig)
          Sets the configuration of token consumer.
 void setUsedTokenGenerator(TokenGeneratorConfig usedConfig)
          Sets the configuration of token generator.
 void setUsedToLogin(boolean usedToLogin)
          Sets the flag that indicates whether the token is used to login.
 
Methods inherited from interface com.ibm.wsspi.security.token.Token
addAttribute, clone, getAttributeNames, getAttributes, getBytes, getExpiration, getName, getPrincipal, getUniqueID, getVersion, isForwardable, isValid, setReadOnly
 

Method Detail

getId

public java.lang.String getId()
Returns id string of this token.

Returns:
id string

setId

public void setId(java.lang.String tid)
Sets id string of this token.

Parameters:
tid -

getElement

public org.w3c.dom.Element getElement()
Returns DOM expression of the token.

Returns:
a token element in the form of Element object

setElement

public void setElement(org.w3c.dom.Element elem)
Sets DOM expression of the token.

Parameters:
elem - An Element of the token itself

getType

public javax.xml.namespace.QName getType()
Returns the value type of the token in the form of a QName object.

Returns:
A value type

setType

public void setType(javax.xml.namespace.QName type)
Sets the value type of the token in the form of a QName object.

Parameters:
type - a qname of the token

setType

public void setType(java.lang.String uri,
                    java.lang.String localName)
Sets the value type of the token by a URI -- local name pair (i.e., qname).

Parameters:
uri -
localName -

setTrusted

public void setTrusted(boolean trusted)
Sets auth required flag.

Parameters:
trusted -

isTrusted

public boolean isTrusted()
Returns auth required flag.

Returns:
True if auth required flag is set, false otherwise

setUsedToLogin

public void setUsedToLogin(boolean usedToLogin)
Sets the flag that indicates whether the token is used to login.

Parameters:
usedToLogin - True if the token is used to login, false otherwise

getUsedToLogin

public boolean getUsedToLogin()
Checks whether the token is used to login or not.

Returns:
True if the token is used to login, false otherwise

getCallerChecked

public boolean getCallerChecked()
Returns if the caller check has been done or not.

Returns:
True if the caller check has been done, false otherwise

setCallerChecked

public void setCallerChecked(boolean isCallerChecked)
Sets the whether the caller check has been done or not.

Parameters:
isCallerChecked - True if caller check has been done, false otherwise

isReferenced

public boolean isReferenced()
Returns if the token is referenced in the message or not.

Returns:
True if the token is referenced, false otherwise

setReferenced

public void setReferenced(boolean isReferenced)
Sets whether the token is referenced in the message or not.

Parameters:
isReferenced - True if the token is referenced, false otherwise

getKeyInfoType

public java.lang.String getKeyInfoType()
Returns the KeyInfo's type.

Returns:
the KeyInfo's type

setKeyInfoType

public void setKeyInfoType(java.lang.String keyInfoType)
Sets the KeyInfo's type.

Parameters:
keyInfoType - The KeyInfo's type

getUsedTokenGenerator

public TokenGeneratorConfig getUsedTokenGenerator()
Returns the configuration of token generator. This method is used only at generator side.

Returns:
the token generator configuration

setUsedTokenGenerator

public void setUsedTokenGenerator(TokenGeneratorConfig usedConfig)
Sets the configuration of token generator. This method is used only at generator side.

Parameters:
usedConfig - The token generator configuration

getUsedTokenConsumer

public TokenConsumerConfig getUsedTokenConsumer()
Returns the configuration of token consumer. This method is used only at consumer side.

Returns:
the token consumer configuration

setUsedTokenConsumer

public void setUsedTokenConsumer(TokenConsumerConfig usedConfig)
Sets the configuration of token consumer. This method is used only at consumer side.

Parameters:
usedConfig - The token consumer configuration

isProcessed

public boolean isProcessed()
Returns if the token is processed or not. This method is used only at consumer side.

Returns:
True if the token is processed, false otherwise

setProcessed

public void setProcessed(boolean isProcessed)
Sets if the token is processed or not. This method is used only at consumer side.

Parameters:
isProcessed - True if the token is processed, false otherwise

getError

public SoapSecurityException getError()
Returns the error that occurs during token processing. This method is used only at consumer side.

Returns:
The SoapSecurityException that occured during token processing

setError

public void setError(SoapSecurityException error)
Sets the error that occurs during token processing. This method is used only at consumer side.

Parameters:
error - The SoapSecurityException that occured during token processing