Class AuthnStatementValidator
- java.lang.Object
-
- org.opensaml.saml.saml2.assertion.impl.AuthnStatementValidator
-
- All Implemented Interfaces:
StatementValidator
public class AuthnStatementValidator extends Object implements StatementValidator
StatementValidatorimplementation forAuthnStatementconditions.Supports the following
ValidationContextstatic parameters:-
SAML2AssertionValidationParameters.STMT_AUTHN_CHECK_ADDRESS: Optional. -
SAML2AssertionValidationParameters.STMT_AUTHN_VALID_ADDRESSES: Required ifSAML2AssertionValidationParameters.STMT_AUTHN_CHECK_ADDRESSis true or omitted, otherwise optional. -
SAML2AssertionValidationParameters.STMT_AUTHN_MAX_TIME: Optional.
Supports the following
ValidationContextdynamic parameters:- None.
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.LoggerlogLogger.
-
Constructor Summary
Constructors Constructor Description AuthnStatementValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QNamegetServicedStatement()ValidationResultvalidate(Statement statement, Assertion assertion, ValidationContext context)protected ValidationResultvalidateAuthnContext(AuthnStatement authnStatement, Assertion assertion, ValidationContext context)Validate theAuthnContext.protected ValidationResultvalidateAuthnInstant(AuthnStatement authnStatement, Assertion assertion, ValidationContext context)Validate the authnInstant attribute of theAuthnStatement.protected ValidationResultvalidateSubjectLocality(AuthnStatement authnStatement, Assertion assertion, ValidationContext context)Validate theSubjectLocality.
-
-
-
Method Detail
-
getServicedStatement
public QName getServicedStatement()
- Specified by:
getServicedStatementin interfaceStatementValidator
-
validate
public ValidationResult validate(@Nonnull Statement statement, @Nonnull Assertion assertion, @Nonnull ValidationContext context) throws AssertionValidationException
- Specified by:
validatein interfaceStatementValidator- Throws:
AssertionValidationException
-
validateAuthnInstant
protected ValidationResult validateAuthnInstant(@Nonnull AuthnStatement authnStatement, @Nonnull Assertion assertion, @Nonnull ValidationContext context) throws AssertionValidationException
Validate the authnInstant attribute of theAuthnStatement.- Parameters:
authnStatement- the current statement being validatedassertion- the current assertion being evaluatedcontext- the current validation context- Returns:
- the validation result
- Throws:
AssertionValidationException- if there is a fatal error during evaluation
-
validateSubjectLocality
protected ValidationResult validateSubjectLocality(@Nonnull AuthnStatement authnStatement, @Nonnull Assertion assertion, @Nonnull ValidationContext context) throws AssertionValidationException
Validate theSubjectLocality.- Parameters:
authnStatement- the current statement being validatedassertion- the current assertion being evaluatedcontext- the current validation context- Returns:
- the validation result
- Throws:
AssertionValidationException- if there is a fatal error during evaluation
-
validateAuthnContext
protected ValidationResult validateAuthnContext(@Nonnull AuthnStatement authnStatement, @Nonnull Assertion assertion, @Nonnull ValidationContext context) throws AssertionValidationException
Validate theAuthnContext.The default implementation is a no-op and always valid. Subclasses may override.
- Parameters:
authnStatement- the current statement being validatedassertion- the current assertion being evaluatedcontext- the current validation context- Returns:
- the validation result
- Throws:
AssertionValidationException- if there is a fatal error during evaluation
-
-