Class AbstractSecurityToken
java.lang.Object
org.apache.xml.security.stax.impl.securityToken.AbstractSecurityToken
- All Implemented Interfaces:
SecurityToken
- Direct Known Subclasses:
AbstractInboundSecurityToken
,GenericOutboundSecurityToken
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addTokenUsage
(SecurityTokenConstants.TokenUsage tokenUsage) getId()
Returns the token id aka wsu:IdReturns the public key if one exists and already initialized, null otherwiseReturns the secret key's if already initialized, null otherwiseReturns a SHA-1 Identifier that refers to this tokenReturns the certificate chain if one exists for this token typeboolean
Returns the token typeprotected void
setAsymmetric
(boolean asymmetric) void
setPublicKey
(PublicKey publicKey) void
setSecretKey
(String algorithmURI, Key key) void
setSha1Identifier
(String sha1Identifier) void
setX509Certificates
(X509Certificate[] x509Certificates) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.xml.security.stax.securityToken.SecurityToken
getKeyIdentifier, getKeyWrappingToken, getTokenType, getWrappedTokens
-
Field Details
-
keyTable
-
tokenUsages
-
-
Constructor Details
-
AbstractSecurityToken
-
-
Method Details
-
getId
Description copied from interface:SecurityToken
Returns the token id aka wsu:Id- Specified by:
getId
in interfaceSecurityToken
- Returns:
- The id
-
setAsymmetric
protected void setAsymmetric(boolean asymmetric) -
isAsymmetric
Description copied from interface:SecurityToken
Returns the token type- Specified by:
isAsymmetric
in interfaceSecurityToken
- Returns:
- true if asymmetric token, false if symmetric token
- Throws:
XMLSecurityException
-
setSecretKey
-
getSecretKey
Description copied from interface:SecurityToken
Returns the secret key's if already initialized, null otherwise- Specified by:
getSecretKey
in interfaceSecurityToken
- Returns:
- Algorithm-URI key map
- Throws:
XMLSecurityException
-
setPublicKey
-
getPublicKey
Description copied from interface:SecurityToken
Returns the public key if one exists and already initialized, null otherwise- Specified by:
getPublicKey
in interfaceSecurityToken
- Returns:
- the public key
- Throws:
XMLSecurityException
-
setX509Certificates
-
getX509Certificates
Description copied from interface:SecurityToken
Returns the certificate chain if one exists for this token type- Specified by:
getX509Certificates
in interfaceSecurityToken
- Returns:
- The certificate chain
- Throws:
XMLSecurityException
- if the certificates can't be retrieved
-
addTokenUsage
- Specified by:
addTokenUsage
in interfaceSecurityToken
- Throws:
XMLSecurityException
-
getTokenUsages
- Specified by:
getTokenUsages
in interfaceSecurityToken
-
getSha1Identifier
Description copied from interface:SecurityToken
Returns a SHA-1 Identifier that refers to this token- Specified by:
getSha1Identifier
in interfaceSecurityToken
- Returns:
- a SHA-1 Identifier that refers to this token
-
setSha1Identifier
-