Class SwedishEidAttributeStatementValidator
- java.lang.Object
-
- se.litsec.opensaml.saml2.common.assertion.AbstractAttributeStatementValidator
-
- se.litsec.swedisheid.opensaml.saml2.validation.SwedishEidAttributeStatementValidator
-
- All Implemented Interfaces:
StatementValidator
public class SwedishEidAttributeStatementValidator extends AbstractAttributeStatementValidator
Validator forAttributeStatements.Supports the following
ValidationContextstatic parameters:REQUIRED_ATTRIBUTE_SET: Optional. Holds aAttributeSetthat tells which attributes we require to find in the assertion.REQUIRED_ATTRIBUTES: Optional. Holds a collection of strings that are the attribute names that we require to find in the assertion.
Note that the two above parameters may be combined. If no parameter for requested attributes is passed, no validation will be performed.
- Author:
- Martin Lindström (martin.lindstrom@litsec.se)
-
-
Field Summary
Fields Modifier and Type Field Description static StringREQUIRED_ATTRIBUTE_SETKey for a validation context parameter.static StringREQUIRED_ATTRIBUTESKey for a validation context parameter.
-
Constructor Summary
Constructors Constructor Description SwedishEidAttributeStatementValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Collection<String>getRequiredAttributes(ValidationContext context)Returns the required attributes.protected ValidationResultvalidateRequiredAttributes(List<Attribute> attributes, AttributeStatement statement, Assertion assertion, ValidationContext context)Validates that the required attributes have been received by using the optional context parameterREQUIRED_ATTRIBUTE_SETthat holds anAttributeSetand/or the list of attribute names from the parameterREQUIRED_ATTRIBUTES.-
Methods inherited from class se.litsec.opensaml.saml2.common.assertion.AbstractAttributeStatementValidator
getServicedStatement, validate
-
-
-
-
Field Detail
-
REQUIRED_ATTRIBUTE_SET
public static final String REQUIRED_ATTRIBUTE_SET
Key for a validation context parameter. Carries aAttributeSetholding the required attributes.- See Also:
- Constant Field Values
-
REQUIRED_ATTRIBUTES
public static final String REQUIRED_ATTRIBUTES
Key for a validation context parameter. Carries aCollectionof strings holding attribute names of requested attributes.- See Also:
- Constant Field Values
-
-
Method Detail
-
validateRequiredAttributes
protected ValidationResult validateRequiredAttributes(List<Attribute> attributes, AttributeStatement statement, Assertion assertion, ValidationContext context)
Validates that the required attributes have been received by using the optional context parameterREQUIRED_ATTRIBUTE_SETthat holds anAttributeSetand/or the list of attribute names from the parameterREQUIRED_ATTRIBUTES.- Specified by:
validateRequiredAttributesin classAbstractAttributeStatementValidator
-
getRequiredAttributes
protected Collection<String> getRequiredAttributes(ValidationContext context)
Returns the required attributes.- Parameters:
context- the validation context- Returns:
- a collection of attribute names (never
null)
-
-