Class SAML2AssertionHandler

java.lang.Object
org.apache.rampart.saml.SAMLAssertionHandler
org.apache.rampart.saml.SAML2AssertionHandler

public class SAML2AssertionHandler extends SAMLAssertionHandler
This class handles SAML2 assertions.Processes SAML2 assertion and will extract SAML2 attributes such as assertion id, start date, end date etc ...
  • Constructor Details

    • SAML2AssertionHandler

      public SAML2AssertionHandler(org.opensaml.saml.saml2.core.Assertion samlAssertion)
  • Method Details

    • isBearerAssertion

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

      protected void processSAMLAssertion()
      Specified by:
      processSAMLAssertion in class SAMLAssertionHandler
    • getAssertionKeyInfoSecret

      public 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
      Description copied from class: SAMLAssertionHandler
      Gets the secret in assertion.
      Specified by:
      getAssertionKeyInfoSecret in class SAMLAssertionHandler
      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 org.apache.axiom.om.OMElement getAssertionElement() throws TrustException
      Description copied from class: SAMLAssertionHandler
      Gets the assertion element as an Axiom OMElement.
      Specified by:
      getAssertionElement in class SAMLAssertionHandler
      Returns:
      OMElement representation of assertion.
      Throws:
      TrustException - if an error occurred while converting Assertion to an OMElement.