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.
  • Method Details

    • 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