Class SAMLAssertionHandler

java.lang.Object
org.apache.rampart.saml.SAMLAssertionHandler
Direct Known Subclasses:
SAML1AssertionHandler, SAML2AssertionHandler

public abstract class SAMLAssertionHandler extends Object
A class to handle attributes to common SAML1 and SAML2 assertions.
  • Constructor Details

    • SAMLAssertionHandler

      public SAMLAssertionHandler()
  • Method Details

    • getAssertionId

      public String getAssertionId()
    • setAssertionId

      protected void setAssertionId(String assertionId)
    • getDateNotBefore

      public Instant getDateNotBefore()
    • setDateNotBefore

      protected void setDateNotBefore(Instant dateNotBefore)
    • getDateNotOnOrAfter

      public Instant getDateNotOnOrAfter()
    • setDateNotOnOrAfter

      protected void setDateNotOnOrAfter(Instant dateNotOnOrAfter)
    • isBearerAssertion

      public abstract boolean isBearerAssertion()
      Checks whether SAML assertion is bearer - urn:oasis:names:tc:SAML:2.0:cm:bearer
      Returns:
      true if assertion is bearer else false.
    • processSAMLAssertion

      protected abstract void processSAMLAssertion()
    • getAssertionKeyInfoSecret

      public abstract byte[] getAssertionKeyInfoSecret(org.apache.wss4j.common.crypto.Crypto signatureCrypto, TokenCallbackHandler tokenCallbackHandler, org.apache.wss4j.dom.handler.RequestData requestData) throws org.apache.wss4j.common.ext.WSSecurityException
      Gets the secret in assertion.
      Parameters:
      signatureCrypto - Signature crypto info, private,public keys.
      tokenCallbackHandler - The token callback class, required for WSS4J processing
      requestData - Allow customization of the numerous optional WSS4J params
      Returns:
      Secret as a byte array
      Throws:
      org.apache.wss4j.common.ext.WSSecurityException - If an error occurred while validating the signature.
    • getAssertionElement

      public abstract org.apache.axiom.om.OMElement getAssertionElement() throws TrustException
      Gets the assertion element as an Axiom OMElement.
      Returns:
      OMElement representation of assertion.
      Throws:
      TrustException - if an error occurred while converting Assertion to an OMElement.