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
ConstructorDescriptionAuthnRequestSignatureValidator
(org.opensaml.xmlsec.signature.support.SignatureTrustEngine signatureTrustEngine) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Predicate that tells whether the received authentication request was signed.protected boolean
Given the IdP settings, and possibly also the SPEntityDescriptor
we determine whether the receivedAuthnRequest
is required to be signed.void
Performs validation of a feature/requirement regarding the supplied SAML 2 authentication request.
-
Constructor Details
-
AuthnRequestSignatureValidator
public AuthnRequestSignatureValidator(org.opensaml.xmlsec.signature.support.SignatureTrustEngine signatureTrustEngine) 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:
validate
in 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:
true
if the authentication request was signed, andfalse
otherwise
-
isSignedAuthnRequestRequired
Given the IdP settings, and possibly also the SPEntityDescriptor
we determine whether the receivedAuthnRequest
is required to be signed.- Parameters:
token
- the token- Returns:
true
if theAuthnRequest
must be signed, andfalse
otherwise
-