Class AuthnRequestSignatureValidator
java.lang.Object
se.swedenconnect.spring.saml.idp.authnrequest.validation.AuthnRequestSignatureValidator
- All Implemented Interfaces:
AuthnRequestValidator
Implementation of a
AuthnRequestValidator using OpenSAML mechanisms to verify the signature of the
AuthnRequest.- Author:
- Martin Lindström
-
Constructor Summary
ConstructorsConstructorDescriptionAuthnRequestSignatureValidator(SignatureTrustEngine signatureTrustEngine) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanPredicate that tells whether the received authentication request was signed.protected booleanGiven the IdP settings, and possibly also the SPEntityDescriptorwe determine whether the receivedAuthnRequestis required to be signed.voidPerforms validation of a feature/requirement regarding the supplied SAML 2 authentication request.
-
Constructor Details
-
AuthnRequestSignatureValidator
Constructor.- Parameters:
signatureTrustEngine- the OpenSAML signature trust engine used to verify signatures
-
-
Method Details
-
validate
public void validate(Saml2AuthnRequestAuthenticationToken token) throws UnrecoverableSaml2IdpException Performs validation of a feature/requirement regarding the supplied SAML 2 authentication request.The method may update the supplied token with information useful in later stages.
- Specified by:
validatein interfaceAuthnRequestValidator- Parameters:
token- the authentication request token- Throws:
UnrecoverableSaml2IdpException- for errors that can not be signalled back to the SAML SP
-
isSigned
Predicate that tells whether the received authentication request was signed.- Parameters:
token- the authentication request token- Returns:
trueif the authentication request was signed, andfalseotherwise
-
isSignedAuthnRequestRequired
Given the IdP settings, and possibly also the SPEntityDescriptorwe determine whether the receivedAuthnRequestis required to be signed.- Parameters:
token- the token- Returns:
trueif theAuthnRequestmust be signed, andfalseotherwise
-