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 TypeMethodDescriptionvoidaddTokenUsage(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 typebooleanReturns the token typeprotected voidsetAsymmetric(boolean asymmetric) voidsetPublicKey(PublicKey publicKey) voidsetSecretKey(String algorithmURI, Key key) voidsetSha1Identifier(String sha1Identifier) voidsetX509Certificates(X509Certificate[] x509Certificates) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:SecurityTokenReturns the token id aka wsu:Id- Specified by:
getIdin interfaceSecurityToken- Returns:
- The id
-
setAsymmetric
protected void setAsymmetric(boolean asymmetric) -
isAsymmetric
Description copied from interface:SecurityTokenReturns the token type- Specified by:
isAsymmetricin interfaceSecurityToken- Returns:
- true if asymmetric token, false if symmetric token
- Throws:
XMLSecurityException
-
setSecretKey
-
getSecretKey
Description copied from interface:SecurityTokenReturns the secret key's if already initialized, null otherwise- Specified by:
getSecretKeyin interfaceSecurityToken- Returns:
- Algorithm-URI key map
- Throws:
XMLSecurityException
-
setPublicKey
-
getPublicKey
Description copied from interface:SecurityTokenReturns the public key if one exists and already initialized, null otherwise- Specified by:
getPublicKeyin interfaceSecurityToken- Returns:
- the public key
- Throws:
XMLSecurityException
-
setX509Certificates
-
getX509Certificates
Description copied from interface:SecurityTokenReturns the certificate chain if one exists for this token type- Specified by:
getX509Certificatesin interfaceSecurityToken- Returns:
- The certificate chain
- Throws:
XMLSecurityException- if the certificates can't be retrieved
-
addTokenUsage
- Specified by:
addTokenUsagein interfaceSecurityToken- Throws:
XMLSecurityException
-
getTokenUsages
- Specified by:
getTokenUsagesin interfaceSecurityToken
-
getSha1Identifier
Description copied from interface:SecurityTokenReturns a SHA-1 Identifier that refers to this token- Specified by:
getSha1Identifierin interfaceSecurityToken- Returns:
- a SHA-1 Identifier that refers to this token
-
setSha1Identifier
-