Interface AttributeSet
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AttributeSetImpl
The specification "Attribute Specification for the Swedish eID Framework" of the Swedish eID Framework defines a
number of "Attribute Sets". This interface represents such an attribute set.
- Author:
- Martin Lindström (martin@idsec.se)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the friendly name for this attribute set.Each attribute set within the Swedish eID Framework is assigned an unique profile identifier.Returns the recommended attributes for this attribute setReturns the required attributes for this attribute setgetUri()
Each attribute set within the Swedish eID Framework is assigned an unique URI.void
validateAttributes
(org.opensaml.saml.saml2.core.Assertion assertion, List<org.opensaml.saml.saml2.metadata.RequestedAttribute> explicitlyRequestedAttributes) Validates the attributes received in the assertion against the attribute set.
-
Method Details
-
getIdentifier
String getIdentifier()Each attribute set within the Swedish eID Framework is assigned an unique profile identifier. This method returns this unique value.- Returns:
- the attribute set identifier
- See Also:
-
getUri
String getUri()Each attribute set within the Swedish eID Framework is assigned an unique URI. This method returns this value.- Returns:
- the attribute set URI
- See Also:
-
getFriendlyName
String getFriendlyName()Returns the friendly name for this attribute set.- Returns:
- the attribute set friendly name
-
getRequiredAttributes
AttributeTemplate[] getRequiredAttributes()Returns the required attributes for this attribute set- Returns:
- an array of required attributes for this set
-
getRecommendedAttributes
AttributeTemplate[] getRecommendedAttributes()Returns the recommended attributes for this attribute set- Returns:
- an array of recommended attributes for this set
-
validateAttributes
void validateAttributes(org.opensaml.saml.saml2.core.Assertion assertion, List<org.opensaml.saml.saml2.metadata.RequestedAttribute> explicitlyRequestedAttributes) throws AttributesValidationException Validates the attributes received in the assertion against the attribute set. The validation logic is as follows:- Make sure that all the attributes that the set states as "required" are included in the assertion.
- Make sure that all explicitly requested attributes, that has the attribute isRequired set, are included in the
assertion. These requested attributes are listed in the SP metadata record as
<md:RequestedAttribute>
elements.
- Parameters:
assertion
- the assertion containing the attributes to validateexplicitlyRequestedAttributes
- a list of explicitly requested attributes that the Service Provider has specified in its metadata record (using<md:RequestedAttribute>
elements). This parameter may benull
if no explicitly requested attributes exist- Throws:
AttributesValidationException
- for violations of the attribute set
-