org.apache.xml.security.stax.securityToken
Interface InboundSecurityToken

All Superinterfaces:
SecurityToken
All Known Implementing Classes:
AbstractInboundSecurityToken, DsaKeyValueSecurityToken, ECKeyValueSecurityToken, KeyNameSecurityToken, RsaKeyValueSecurityToken, X509IssuerSerialSecurityToken, X509SecurityToken, X509SKISecurityToken, X509SubjectNameSecurityToken

public interface InboundSecurityToken
extends SecurityToken

This class represents the different token types which can occur in WS-Security

Sometimes it isn't known (@see EncryptedKeyInputProcessor) which kind of Token(Asymmetric, Symmetric) we have at creation time. So we use a generic interface for both types.

Version:
$Revision: 1585385 $ $Date: 2014-04-07 06:12:23 +0100 (Mon, 07 Apr 2014) $
Author:
$Author: coheigea $

Method Summary
 void addWrappedToken(InboundSecurityToken securityToken)
           
 List<QName> getElementPath()
          Returns the absolute path to the XMLElement
 PublicKey getPublicKey(String algorithmURI, XMLSecurityConstants.AlgorithmUsage algorithmUsage, String correlationID)
          Returns the public key if one exist for this token type
 Key getSecretKey(String algorithmURI, XMLSecurityConstants.AlgorithmUsage algorithmUsage, String correlationID)
          Returns the secret key
 XMLSecEvent getXMLSecEvent()
          Returns the first XMLEvent for this token
 boolean isIncludedInMessage()
          Returns if the token is included in the message or not
 void verify()
          Verifies the key if applicable
 
Methods inherited from interface org.apache.xml.security.stax.securityToken.SecurityToken
addTokenUsage, getId, getKeyIdentifier, getKeyWrappingToken, getPublicKey, getSecretKey, getSha1Identifier, getTokenType, getTokenUsages, getWrappedTokens, getX509Certificates, isAsymmetric
 

Method Detail

getSecretKey

Key getSecretKey(String algorithmURI,
                 XMLSecurityConstants.AlgorithmUsage algorithmUsage,
                 String correlationID)
                 throws XMLSecurityException
Returns the secret key

Parameters:
algorithmURI - for the requested key
algorithmUsage -
Returns:
The requested key for the specified algorithmURI, or null if no matching key is found
Throws:
XMLSecurityException - if the key can't be loaded

getPublicKey

PublicKey getPublicKey(String algorithmURI,
                       XMLSecurityConstants.AlgorithmUsage algorithmUsage,
                       String correlationID)
                       throws XMLSecurityException
Returns the public key if one exist for this token type

Parameters:
algorithmURI -
algorithmUsage -
Returns:
The Public-Key for asymmetric algorithms
Throws:
XMLSecurityException - if the key can't be loaded

addWrappedToken

void addWrappedToken(InboundSecurityToken securityToken)

verify

void verify()
            throws XMLSecurityException
Verifies the key if applicable

Throws:
XMLSecurityException - if the key couldn't be verified or the key isn't valid

getElementPath

List<QName> getElementPath()
Returns the absolute path to the XMLElement

Returns:
A list containing full qualified element names

getXMLSecEvent

XMLSecEvent getXMLSecEvent()
Returns the first XMLEvent for this token

Returns:
the first XMLEvent for this token

isIncludedInMessage

boolean isIncludedInMessage()
Returns if the token is included in the message or not

Returns:
true if the token is included false otherwise


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