Interface SecurityToken
-
- All Known Subinterfaces:
InboundSecurityToken,OutboundSecurityToken
- All Known Implementing Classes:
AbstractInboundSecurityToken,AbstractSecurityToken,DsaKeyValueSecurityToken,ECKeyValueSecurityToken,GenericOutboundSecurityToken,KeyNameSecurityToken,RsaKeyValueSecurityToken,X509IssuerSerialSecurityToken,X509SecurityToken,X509SKISecurityToken,X509SubjectNameSecurityToken
public interface SecurityTokenExternal view to a SecurityToken
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddTokenUsage(SecurityTokenConstants.TokenUsage tokenUsage)java.lang.StringgetId()Returns the token id aka wsu:IdSecurityTokenConstants.KeyIdentifiergetKeyIdentifier()Returns the KeyIdentifierSecurityTokengetKeyWrappingToken()Returns the key wrapping tokenjava.security.PublicKeygetPublicKey()Returns the public key if one exists and already initialized, null otherwisejava.util.Map<java.lang.String,java.security.Key>getSecretKey()Returns the secret key's if already initialized, null otherwisejava.lang.StringgetSha1Identifier()Returns a SHA-1 Identifier that refers to this tokenSecurityTokenConstants.TokenTypegetTokenType()java.util.List<SecurityTokenConstants.TokenUsage>getTokenUsages()java.util.List<? extends SecurityToken>getWrappedTokens()java.security.cert.X509Certificate[]getX509Certificates()Returns the certificate chain if one exists for this token typebooleanisAsymmetric()Returns the token type
-
-
-
Method Detail
-
getId
java.lang.String getId()
Returns the token id aka wsu:Id- Returns:
- The id
-
isAsymmetric
boolean isAsymmetric() throws XMLSecurityExceptionReturns the token type- Returns:
- true if asymmetric token, false if symmetric token
- Throws:
XMLSecurityException
-
getSecretKey
java.util.Map<java.lang.String,java.security.Key> getSecretKey() throws XMLSecurityExceptionReturns the secret key's if already initialized, null otherwise- Returns:
- Algorithm-URI key map
- Throws:
XMLSecurityException
-
getPublicKey
java.security.PublicKey getPublicKey() throws XMLSecurityExceptionReturns the public key if one exists and already initialized, null otherwise- Returns:
- the public key
- Throws:
XMLSecurityException
-
getX509Certificates
java.security.cert.X509Certificate[] getX509Certificates() throws XMLSecurityExceptionReturns the certificate chain if one exists for this token type- Returns:
- The certificate chain
- Throws:
XMLSecurityException- if the certificates can't be retrieved
-
getKeyWrappingToken
SecurityToken getKeyWrappingToken() throws XMLSecurityException
Returns the key wrapping token- Returns:
- The wrapping SecurityToken
- Throws:
XMLSecurityException
-
getWrappedTokens
java.util.List<? extends SecurityToken> getWrappedTokens() throws XMLSecurityException
- Throws:
XMLSecurityException
-
getKeyIdentifier
SecurityTokenConstants.KeyIdentifier getKeyIdentifier()
Returns the KeyIdentifier- Returns:
- the KeyIdentifier
-
getTokenType
SecurityTokenConstants.TokenType getTokenType()
-
getTokenUsages
java.util.List<SecurityTokenConstants.TokenUsage> getTokenUsages()
-
addTokenUsage
void addTokenUsage(SecurityTokenConstants.TokenUsage tokenUsage) throws XMLSecurityException
- Throws:
XMLSecurityException
-
getSha1Identifier
java.lang.String getSha1Identifier()
Returns a SHA-1 Identifier that refers to this token- Returns:
- a SHA-1 Identifier that refers to this token
-
-