Interface SecurityToken
-
- All Known Subinterfaces:
InboundSecurityToken
,OutboundSecurityToken
- All Known Implementing Classes:
AbstractInboundSecurityToken
,AbstractSecurityToken
,DsaKeyValueSecurityToken
,ECKeyValueSecurityToken
,GenericOutboundSecurityToken
,KeyNameSecurityToken
,RsaKeyValueSecurityToken
,X509IssuerSerialSecurityToken
,X509SecurityToken
,X509SKISecurityToken
,X509SubjectNameSecurityToken
public interface SecurityToken
External view to a SecurityToken
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addTokenUsage(SecurityTokenConstants.TokenUsage tokenUsage)
java.lang.String
getId()
Returns the token id aka wsu:IdSecurityTokenConstants.KeyIdentifier
getKeyIdentifier()
Returns the KeyIdentifierSecurityToken
getKeyWrappingToken()
Returns the key wrapping tokenjava.security.PublicKey
getPublicKey()
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.String
getSha1Identifier()
Returns a SHA-1 Identifier that refers to this tokenSecurityTokenConstants.TokenType
getTokenType()
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 typeboolean
isAsymmetric()
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 XMLSecurityException
Returns 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 XMLSecurityException
Returns the secret key's if already initialized, null otherwise- Returns:
- Algorithm-URI key map
- Throws:
XMLSecurityException
-
getPublicKey
java.security.PublicKey getPublicKey() throws XMLSecurityException
Returns the public key if one exists and already initialized, null otherwise- Returns:
- the public key
- Throws:
XMLSecurityException
-
getX509Certificates
java.security.cert.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
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
-
-