public class SwedishEidAuthnStatementValidator
extends se.litsec.opensaml.saml2.common.assertion.AuthnStatementValidator
AuthnStatementValidator
that performs checks to assert that the assertion is compliant with the Swedish
eID Framework.
Supports the following ValidationContext
static parameters:
AuthnStatementValidator
.AUTHN_REQUEST_REQUESTED_AUTHNCONTEXTURIS
: Holds a collection of AuthnContext URIs that are matched
against the AuthnContextClassRef
element of the authentication statement. If not supplied, the values are
read from CoreValidatorParameters.AUTHN_REQUEST
.Modifier and Type | Field and Description |
---|---|
static String |
AUTHN_REQUEST_REQUESTED_AUTHNCONTEXTURIS
Key for a validation context parameter.
|
Constructor and Description |
---|
SwedishEidAuthnStatementValidator() |
Modifier and Type | Method and Description |
---|---|
protected static Collection<String> |
getRequestedAuthnContextUris(ValidationContext context)
Returns a collection of URIs that are the RequestedAuthnContext URIs given in the
AuthnRequest . |
protected ValidationResult |
validateAuthnContext(AuthnStatement statement,
Assertion assertion,
ValidationContext context)
Overrides default implementation with checks that assert that a
AuthnContextClassRef URI was received, and
that it matches what was requested. |
protected ValidationResult |
validateAuthnContextClassRef(String authnContextClassRef,
Collection<String> requestedContextClassRefs,
AuthnStatement statement,
Assertion assertion,
ValidationContext context)
Checks the issued AuthnContextClassRef against the ones that were requested.
|
getAuthnRequestIssueInstant, getForceAuthnFlag, getServicedStatement, validate, validate, validateAuthnInstant, validateSessionIndex, validateSessionNotOnOrAfter, validateSsoAndSession, validateSubjectLocality
public static final String AUTHN_REQUEST_REQUESTED_AUTHNCONTEXTURIS
Collection
holding the requested AuthnContext URIs
included in the AuthnRequest
.protected ValidationResult validateAuthnContext(AuthnStatement statement, Assertion assertion, ValidationContext context)
AuthnContextClassRef
URI was received, and
that it matches what was requested.validateAuthnContext
in class se.litsec.opensaml.saml2.common.assertion.AuthnStatementValidator
protected ValidationResult validateAuthnContextClassRef(String authnContextClassRef, Collection<String> requestedContextClassRefs, AuthnStatement statement, Assertion assertion, ValidationContext context)
authnContextClassRef
- the AuthnContextClassRef from the assertionrequestedContextClassRefs
- the requested levelsstatement
- the authentication statementassertion
- the assertioncontext
- the validation contextprotected static Collection<String> getRequestedAuthnContextUris(ValidationContext context)
AuthnRequest
. The method
will first check if the parameter AUTHN_REQUEST_REQUESTED_AUTHNCONTEXTURIS
is set, and if not, use the
CoreValidatorParameters.AUTHN_REQUEST
.context
- the validation contextCopyright © 2018 Litsec AB. All rights reserved.