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)StringgetId()Returns the token id aka wsu:IdSecurityTokenConstants.KeyIdentifiergetKeyIdentifier()Returns the KeyIdentifierSecurityTokengetKeyWrappingToken()Returns the key wrapping tokenPublicKeygetPublicKey()Returns the public key if one exists and already initialized, null otherwiseMap<String,Key>getSecretKey()Returns the secret key's if already initialized, null otherwiseStringgetSha1Identifier()Returns a SHA-1 Identifier that refers to this tokenSecurityTokenConstants.TokenTypegetTokenType()List<SecurityTokenConstants.TokenUsage>getTokenUsages()List<? extends SecurityToken>getWrappedTokens()X509Certificate[]getX509Certificates()Returns the certificate chain if one exists for this token typebooleanisAsymmetric()Returns the token type
-
-
-
Method Detail
-
getId
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
Map<String,Key> getSecretKey() throws XMLSecurityException
Returns the secret key's if already initialized, null otherwise- Returns:
- Algorithm-URI key map
- Throws:
XMLSecurityException
-
getPublicKey
PublicKey getPublicKey() throws XMLSecurityException
Returns the public key if one exists and already initialized, null otherwise- Returns:
- the public key
- Throws:
XMLSecurityException
-
getX509Certificates
X509Certificate[] getX509Certificates() throws XMLSecurityException
Returns 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
List<? extends SecurityToken> getWrappedTokens() throws XMLSecurityException
- Throws:
XMLSecurityException
-
getKeyIdentifier
SecurityTokenConstants.KeyIdentifier getKeyIdentifier()
Returns the KeyIdentifier- Returns:
- the KeyIdentifier
-
getTokenType
SecurityTokenConstants.TokenType getTokenType()
-
getTokenUsages
List<SecurityTokenConstants.TokenUsage> getTokenUsages()
-
addTokenUsage
void addTokenUsage(SecurityTokenConstants.TokenUsage tokenUsage) throws XMLSecurityException
- Throws:
XMLSecurityException
-
getSha1Identifier
String getSha1Identifier()
Returns a SHA-1 Identifier that refers to this token- Returns:
- a SHA-1 Identifier that refers to this token
-
-