org.apache.xml.security.stax.securityToken
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
 void addTokenUsage(SecurityTokenConstants.TokenUsage tokenUsage)
           
 String getId()
          Returns the token id aka wsu:Id
 SecurityTokenConstants.KeyIdentifier getKeyIdentifier()
          Returns the KeyIdentifier
 SecurityToken getKeyWrappingToken()
          Returns the key wrapping token
 PublicKey getPublicKey()
          Returns the public key if one exists and already initialized, null otherwise
 Map<String,Key> getSecretKey()
          Returns the secret key's if already initialized, null otherwise
 String getSha1Identifier()
          Returns a SHA-1 Identifier that refers to this token
 SecurityTokenConstants.TokenType getTokenType()
           
 List<SecurityTokenConstants.TokenUsage> getTokenUsages()
           
 List<? extends SecurityToken> getWrappedTokens()
           
 X509Certificate[] getX509Certificates()
          Returns the certificate chain if one exists for this token type
 boolean isAsymmetric()
          Returns the token type
 

Method Detail

getId

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

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


Copyright © 2000–2014 The Apache Software Foundation. All rights reserved.