com.ibm.websphere.wssecurity.wssapi.token

Interface SecurityToken

All known subinterfaces:
BinarySecurityToken, DerivedKeyToken, ExchangeToken, GenericSecurityToken, KRB5_APREQ1510Token, KRB5_APREQ4120Token, KRB5_APREQToken, KRB5_GSSAPREQ1510Token, KRB5_GSSAPREQ4120Token, KRB5_GSSAPREQToken, KRBToken, SAMLToken, SecurityContextToken, SecurityContextToken13, UsernameToken, X509PKCS7Token, X509PKIPathToken, X509Token

  1. public interface SecurityToken
This interface is responsible for the security token.
When you apply both signature and encryption to the SOAP message, you should prepare two SecurityToken objects for the signature and for the encryption respectively. The security token object is generated with the callback handler that stores the required information.
See Also:
CallbackHandler

Field Summary

Modifier and Type Field and Description
  1. static
  2. int
DECRYPTING_KEY
Represents the key to use the decryption as the key type related with the security token.
  1. static
  2. int
ENCRYPTING_KEY
Represents the key to use the encryption as the key type related with the security token.
  1. static
  2. int
REF_EMBEDDED
Represents the embedded reference as a Token Reference type.
  1. static
  2. int
REF_KEYID
Represents the key identifier reference as a Token Reference type.
  1. static
  2. int
REF_STR
Represents the security token reference as a Token Reference type.
  1. static
  2. int
REF_THUMBPRINT
Represents the thumb print reference as a Token Reference type.
  1. static
  2. int
SIGNING_KEY
Represents the key to use the signature as the key type related with the security token.
  1. static
  2. javax.xml.namespace.QName
TokenQname
Represents the QName of the security token.
  1. static
  2. javax.xml.namespace.QName
ValueType
Represents the value type.
  1. static
  2. int
VERIFING_KEY
Represents the key to use the verification as the key type related with the security token.

Method Summary

Modifier and Type Method and Description
  1. java.lang.String
getId()
Returns the unique identifier of the security token.
  1. java.security.Key
getKey(int keyType)
Returns the key related with the security token.
  1. java.lang.String
getKeyIdentifier()
Returns the key identifier related with the security token.
  1. javax.xml.namespace.QName
getKeyIdentifierEncodingType()
Returns the QName of KeyId encoding type.
  1. javax.xml.namespace.QName
getKeyIdentifierValueType()
Returns the QName of keyId value type.
  1. java.lang.String
getKeyName()
Returns the name of key related with the security token.
  1. java.lang.String
getPrincipal()
Returns the principal that this security oken belongs to.
  1. java.lang.String
getReferenceURI()
Returns the URI of the security token reference.
  1. java.lang.String
getThumbprint()
Returns information of thumb print.
  1. javax.xml.namespace.QName
getThumbprintEncodingType()
Returns the enconding type of thumb print.
  1. javax.xml.namespace.QName
getThumbprintValueType()
Returns value type of thumb print.
  1. javax.xml.namespace.QName
getTokenQname()
Returns the qname expression of the security token
  1. javax.xml.namespace.QName
getValueType()
Returns the value type.
  1. XMLStructure
getXML()
Returns the XML representation.

Field Detail

SIGNING_KEY

  1. static final int SIGNING_KEY
Represents the key to use the signature as the key type related with the security token.
See Also:

ENCRYPTING_KEY

  1. static final int ENCRYPTING_KEY
Represents the key to use the encryption as the key type related with the security token.
See Also:

VERIFING_KEY

  1. static final int VERIFING_KEY
Represents the key to use the verification as the key type related with the security token.
See Also:

DECRYPTING_KEY

  1. static final int DECRYPTING_KEY
Represents the key to use the decryption as the key type related with the security token.
See Also:

REF_STR

  1. static final int REF_STR
Represents the security token reference as a Token Reference type.
See Also:

REF_KEYID

  1. static final int REF_KEYID
Represents the key identifier reference as a Token Reference type.
See Also:

REF_EMBEDDED

  1. static final int REF_EMBEDDED
Represents the embedded reference as a Token Reference type.
See Also:

REF_THUMBPRINT

  1. static final int REF_THUMBPRINT
Represents the thumb print reference as a Token Reference type.
See Also:

ValueType

  1. static final javax.xml.namespace.QName ValueType
Represents the value type.

TokenQname

  1. static final javax.xml.namespace.QName TokenQname
Represents the QName of the security token.

Method Detail

getKey

  1. java.security.Key getKey(int keyType)
  2. throws WSSException
Returns the key related with the security token.
Parameters:
keyType - Type of key related with token, such as SIGNING_KEY, ENCRYPTING_KEY, VERIFING_KEY, and DECRYPTING_KEY.
Returns:
key
Throws:
WSSException - if the keyType is not valid

getXML

  1. XMLStructure getXML()
Returns the XML representation.
Returns:
XML representation of the security token

getId

  1. java.lang.String getId()
Returns the unique identifier of the security token.
Returns:
an identifier of token

getReferenceURI

  1. java.lang.String getReferenceURI( )
Returns the URI of the security token reference.
Returns:
the token reference URI

getKeyIdentifier

  1. java.lang.String getKeyIdentifier( )
Returns the key identifier related with the security token.
Returns:
the key indentifier

getKeyIdentifierEncodingType

  1. javax.xml.namespace.QName getKeyIdentifierEncodingType( )
Returns the QName of KeyId encoding type.
Returns:
the QName of the encoding type

getKeyIdentifierValueType

  1. javax.xml.namespace.QName getKeyIdentifierValueType( )
Returns the QName of keyId value type.
Returns:
the QName of value type

getKeyName

  1. java.lang.String getKeyName()
Returns the name of key related with the security token.
Returns:
the key name

getValueType

  1. javax.xml.namespace.QName getValueType( )
Returns the value type.
Returns:
the value type

getTokenQname

  1. javax.xml.namespace.QName getTokenQname( )
Returns the qname expression of the security token
Returns:
token qname

getThumbprint

  1. java.lang.String getThumbprint( )
Returns information of thumb print.
Returns:
the thumb print

getThumbprintValueType

  1. javax.xml.namespace.QName getThumbprintValueType( )
Returns value type of thumb print.
Returns:
the value type

getThumbprintEncodingType

  1. javax.xml.namespace.QName getThumbprintEncodingType( )
Returns the enconding type of thumb print.
Returns:
the encoding type

getPrincipal

  1. java.lang.String getPrincipal()

Returns the principal that this security oken belongs to. If this is an authorization token, this principal string must match the authentication token principal string or the message will be rejected. CSIv2 has stringent rules about validating authorization tokens using either the identity token or authentication token principal.

Returns:
String the principal