Class SwedishEidResponseValidator

java.lang.Object
se.swedenconnect.opensaml.common.validation.AbstractObjectValidator<org.opensaml.saml.saml2.core.Response>
se.swedenconnect.opensaml.common.validation.AbstractSignableObjectValidator<org.opensaml.saml.saml2.core.Response>
se.swedenconnect.opensaml.saml2.response.validation.ResponseValidator
se.swedenconnect.opensaml.sweid.saml2.validation.SwedishEidResponseValidator
All Implemented Interfaces:
ObjectValidator<org.opensaml.saml.saml2.core.Response>

public class SwedishEidResponseValidator extends ResponseValidator
Extends the default response validator with requirements for the Swedish eID Framework.

Supports the following ValidationContext static parameters as described in ResponseValidator.

Author:
Martin Lindström (martin@idsec.se)
  • Constructor Details

    • SwedishEidResponseValidator

      public SwedishEidResponseValidator(org.opensaml.xmlsec.signature.support.SignatureTrustEngine trustEngine, org.opensaml.xmlsec.signature.support.SignaturePrevalidator signaturePrevalidator) throws IllegalArgumentException
      Constructor.
      Parameters:
      trustEngine - the trust used to validate the object's signature
      signaturePrevalidator - the signature pre-validator used to pre-validate the object's signature
      Throws:
      IllegalArgumentException - if null values are supplied
  • Method Details

    • validateSignature

      protected org.opensaml.saml.common.assertion.ValidationResult validateSignature(org.opensaml.saml.saml2.core.Response token, org.opensaml.saml.common.assertion.ValidationContext context)
      Overrides the default signature validation by enforcing signature validation because a Response message MUST be signed according to the Swedish eID Framework.
      Overrides:
      validateSignature in class AbstractSignableObjectValidator<org.opensaml.saml.saml2.core.Response>
    • validateAssertions

      public org.opensaml.saml.common.assertion.ValidationResult validateAssertions(org.opensaml.saml.saml2.core.Response response, org.opensaml.saml.common.assertion.ValidationContext context)
      Checks according to ResponseValidator.validateAssertions(Response, ValidationContext) and extends the check to validate that assertion is encrypted.
      Overrides:
      validateAssertions in class ResponseValidator