com.ibm.wsspi.wssecurity.auth.token
Class WSSToken
- java.lang.Object
com.ibm.wsspi.wssecurity.auth.token.WSSToken
All implemented interfaces:
PropagationToken, Token, java.lang.Cloneable
Direct known subclasses:
- public abstract class WSSToken
- extends java.lang.Object
- implements Token
Token
interface for processing security
tokens.
Protected by following Java 2 Security permissions:
com.ibm.websphere.security.WebSphereRuntimePermission("wssecurity.WSSToken.setTrusted")
com.ibm.websphere.security.WebSphereRuntimePermission("wssecurity.WSSToken.addAttribute")
com.ibm.websphere.security.WebSphereRuntimePermission("wssecurity.WSSToken.setUsedTokenConsumer")
See Also:
Nested Class Summary
Modifier and Type | Class and Description |
---|---|
|
WSSToken.AttributesEnumerator
|
Field Summary
Modifier and Type | Field and Description |
---|---|
|
_attributes
|
|
_callerChecked
|
|
_error
|
|
_keyInfoType
|
|
_processed
|
|
_referenced
|
|
_tokenelem
|
|
_tokenId
|
|
_trusted
|
|
_usedTokenConsumer
|
|
_usedTokenGenerator
|
|
_usedToLogin
|
|
_version
|
|
_vtype
|
Constructor Summary
Constructor and Description |
---|
WSSToken()
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
addAttribute(java.lang.String key,java.lang.String value)
Adds an attribute in the form of a key-value pair.
|
|
clone()
Returns a copy of this class instance
|
|
getAttributeNames()
Returns the enumeration of attribute names.
|
|
getAttributes(java.lang.String key)
Returns the attributes of the specified key.
|
|
getBytes()
Returns the byte array representation of this token if possible.
|
|
getCallerChecked()
Returns if the caller check has been done or not.
|
|
getElement()
Returns DOM expression of the token.
|
getError()
Returns the error that occurs during token processing.
|
|
|
getId()
Returns id string of this token.
|
|
getKeyInfoType()
Gets the KeyInfo's type.
|
|
getName()
Returns the implementation class name
|
|
getType()
Returns the value type of the token in the form of a
QName object.
|
getUsedTokenConsumer()
Returns the configuration of token consumer.
|
|
getUsedTokenGenerator()
Returns the configuration of token generator.
|
|
|
getUsedToLogin()
Checks whether the token is used to login or not.
|
|
getVersion()
Returns the implementation version
|
|
isForwardable()
Checks if the token is forwardable or not
|
|
isProcessed()
Returns if the token is processed or not.
|
|
isReadOnly()
|
|
isReferenced()
Returns if the token is referenced in the message or not.
|
|
isTrusted()
Returns auth required flag
|
|
setCallerChecked(boolean isCallerChecked)
Sets the whether the caller check has been done or not.
|
|
setElement(org.w3c.dom.Element elem)
Sets DOM expression of the token.
|
|
setError(SoapSecurityException error)
Sets the error that occurs during token processing.
|
|
setId(java.lang.String tid)
Sets id string of this token.
|
|
setKeyInfoType(java.lang.String keyInfoType)
Sets the KeyInfo's type.
|
|
setProcessed(boolean isProcessed)
Sets if the token is processed or not.
|
|
setReadOnly()
|
|
setReferenced(boolean isReferenced)
Sets whether the token is referenced in the message or not.
|
|
setTrusted(boolean trusted)
Sets auth required flag.
|
|
setType(javax.xml.namespace.QName type)
Sets the value type of the token in the form of a
QName object.
|
|
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).
|
|
setUsedTokenConsumer(TokenConsumerConfig usedConfig)
Sets the configuration of token consumer.
|
|
setUsedTokenGenerator(TokenGeneratorConfig usedConfig)
Sets the configuration of token generator.
|
|
setUsedToLogin(boolean usedToLogin)
Sets the flag that indicates whether the token is used to login.
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.wsspi.security.token.Token |
---|
getExpiration, getPrincipal, getUniqueID, isValid |
Field Detail
_version
- protected static final short _version
See Also:
_attributes
- protected java.util.HashMap _attributes
_tokenId
- protected java.lang.String _tokenId
_tokenelem
- protected org.w3c.dom.Element _tokenelem
_vtype
- protected javax.xml.namespace.QName _vtype
_keyInfoType
- protected java.lang.String _keyInfoType
_trusted
- protected boolean _trusted
_usedToLogin
- protected boolean _usedToLogin
_callerChecked
- protected boolean _callerChecked
_referenced
- protected boolean _referenced
_usedTokenGenerator
- protected TokenGeneratorConfig _usedTokenGenerator
_usedTokenConsumer
- protected TokenConsumerConfig _usedTokenConsumer
_processed
- protected boolean _processed
_error
- protected SoapSecurityException _error
Constructor Detail
WSSToken
- public WSSToken()
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
- getKeyInfoType
- public java.lang.String getKeyInfoType( )
Gets 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 getBytes
- public byte[] getBytes()
Returns the byte array representation of this token if possible.
Returns:
The byte array representation of this token
getName
- public java.lang.String getName( )
Returns the implementation class name
Returns:
The implementation class name
getVersion
- public short getVersion()
Returns the implementation version
Specified by:
getVersion
in interface Token
Returns:
The implementation version
isForwardable
- public boolean isForwardable()
Checks if the token is forwardable or not
Specified by:
isForwardable
in interface Token
Returns:
True if the token is forwardable, false otherwise
clone
- public java.lang.Object clone()
Returns a copy of this class instance
Returns:
A copy of this class instance
setTrusted
- public void setTrusted(boolean trusted)
Sets auth required flag.
Parameters:
trusted
- True if auth is required, false otherwise
Protected by Java 2 Security permission com.ibm.websphere.security.WebSphereRuntimePermission("wssecurity.WSSToken.setTrusted") isTrusted
- public boolean isTrusted()
Returns auth required flag
Returns:
True if auth is required, 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
getAttributeNames
- public java.util.Enumeration getAttributeNames( )
Returns the enumeration of attribute names.
Specified by:
getAttributeNames
in interface Token
Returns:
The enumeration of attribute names
getAttributes
- public java.lang.String[] getAttributes( java.lang.String key)
Returns the attributes of the specified key.
Specified by:
getAttributes
in interface Token
Parameters:
key
- The key of the attributes to retrieve Returns:
The
String[]
of attributes of the specified key addAttribute
- public java.lang.String[] addAttribute( java.lang.String key,
- java.lang.String value)
Adds an attribute in the form of a key-value pair.
Specified by:
addAttribute
in interface Token
Parameters:
key
- The key of the attribute to add value
- The value of the attribute to add Returns:
The
String[]
representation of the set of attributes
Protected by Java 2 Security Permission com.ibm.websphere.security.WebSphereRuntimePermission("wssecurity.WSSToken.addAttribute") 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 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
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 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
Protected by Java 2 Security permission com.ibm.websphere.security.WebSphereRuntimePermission("wssecurity.WSSToken.setUsedTokenConsumer") 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 isReadOnly
- public boolean isReadOnly()
setReadOnly
- public void setReadOnly()
Description copied from interface:
Token
When called, the token becomes irreversibly read-only. The implementation needs to ensure any setter methods check that this has been set.
Specified by:
setReadOnly
in interface Token