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
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
Fields Modifier and Type Field and Description static int
DECRYPTING_KEY
Represents the key to use the decryption as the key type related with the security token.static int
ENCRYPTING_KEY
Represents the key to use the encryption as the key type related with the security token.static int
REF_EMBEDDED
Represents the embedded reference as a Token Reference type.static int
REF_KEYID
Represents the key identifier reference as a Token Reference type.static int
REF_STR
Represents the security token reference as a Token Reference type.static int
REF_THUMBPRINT
Represents the thumb print reference as a Token Reference type.static int
SIGNING_KEY
Represents the key to use the signature as the key type related with the security token.static javax.xml.namespace.QName
TokenQname
Represents the QName of the security token.static javax.xml.namespace.QName
ValueType
Represents the value type.static int
VERIFING_KEY
Represents the key to use the verification as the key type related with the security token.
-
Method Summary
Methods Modifier and Type Method and Description java.lang.String
getId()
Returns the unique identifier of the security token.java.security.Key
getKey(int keyType)
Returns the key related with the security token.java.lang.String
getKeyIdentifier()
Returns the key identifier related with the security token.javax.xml.namespace.QName
getKeyIdentifierEncodingType()
Returns the QName of KeyId encoding type.javax.xml.namespace.QName
getKeyIdentifierValueType()
Returns the QName of keyId value type.java.lang.String
getKeyName()
Returns the name of key related with the security token.java.lang.String
getPrincipal()
Returns the principal that this security oken belongs to.java.lang.String
getReferenceURI()
Returns the URI of the security token reference.java.lang.String
getThumbprint()
Returns information of thumb print.javax.xml.namespace.QName
getThumbprintEncodingType()
Returns the enconding type of thumb print.javax.xml.namespace.QName
getThumbprintValueType()
Returns value type of thumb print.javax.xml.namespace.QName
getTokenQname()
Returns the qname expression of the security tokenjavax.xml.namespace.QName
getValueType()
Returns the value type.XMLStructure
getXML()
Returns the XML representation.
-
-
-
Field Detail
-
SIGNING_KEY
static final int SIGNING_KEY
Represents the key to use the signature as the key type related with the security token.- See Also:
- Constant Field Values
-
ENCRYPTING_KEY
static final int ENCRYPTING_KEY
Represents the key to use the encryption as the key type related with the security token.- See Also:
- Constant Field Values
-
VERIFING_KEY
static final int VERIFING_KEY
Represents the key to use the verification as the key type related with the security token.- See Also:
- Constant Field Values
-
DECRYPTING_KEY
static final int DECRYPTING_KEY
Represents the key to use the decryption as the key type related with the security token.- See Also:
- Constant Field Values
-
REF_STR
static final int REF_STR
Represents the security token reference as a Token Reference type.- See Also:
- Constant Field Values
-
REF_KEYID
static final int REF_KEYID
Represents the key identifier reference as a Token Reference type.- See Also:
- Constant Field Values
-
REF_EMBEDDED
static final int REF_EMBEDDED
Represents the embedded reference as a Token Reference type.- See Also:
- Constant Field Values
-
REF_THUMBPRINT
static final int REF_THUMBPRINT
Represents the thumb print reference as a Token Reference type.- See Also:
- Constant Field Values
-
ValueType
static final javax.xml.namespace.QName ValueType
Represents the value type.
-
TokenQname
static final javax.xml.namespace.QName TokenQname
Represents the QName of the security token.
-
-
Method Detail
-
getKey
java.security.Key getKey(int keyType) 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
XMLStructure getXML()
Returns the XML representation.- Returns:
- XML representation of the security token
-
getId
java.lang.String getId()
Returns the unique identifier of the security token.- Returns:
- an identifier of token
-
getReferenceURI
java.lang.String getReferenceURI()
Returns the URI of the security token reference.- Returns:
- the token reference URI
-
getKeyIdentifier
java.lang.String getKeyIdentifier()
Returns the key identifier related with the security token.- Returns:
- the key indentifier
-
getKeyIdentifierEncodingType
javax.xml.namespace.QName getKeyIdentifierEncodingType()
Returns the QName of KeyId encoding type.- Returns:
- the QName of the encoding type
-
getKeyIdentifierValueType
javax.xml.namespace.QName getKeyIdentifierValueType()
Returns the QName of keyId value type.- Returns:
- the QName of value type
-
getKeyName
java.lang.String getKeyName()
Returns the name of key related with the security token.- Returns:
- the key name
-
getValueType
javax.xml.namespace.QName getValueType()
Returns the value type.- Returns:
- the value type
-
getTokenQname
javax.xml.namespace.QName getTokenQname()
Returns the qname expression of the security token- Returns:
- token qname
-
getThumbprint
java.lang.String getThumbprint()
Returns information of thumb print.- Returns:
- the thumb print
-
getThumbprintValueType
javax.xml.namespace.QName getThumbprintValueType()
Returns value type of thumb print.- Returns:
- the value type
-
getThumbprintEncodingType
javax.xml.namespace.QName getThumbprintEncodingType()
Returns the enconding type of thumb print.- Returns:
- the encoding type
-
getPrincipal
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
-
-