Class RequestedAttributeTemplates
java.lang.Object
se.swedenconnect.opensaml.eidas.ext.RequestedAttributeTemplates
Utility methods for use when
RequestedAttribute elements are inserted in an AuthnRequest extension.- Author:
- Martin Lindström
-
Method Summary
Modifier and TypeMethodDescriptionstatic RequestedAttributeCreates aRequestedAttributeobject for the given attribute name.static RequestedAttributeCURRENT_ADDRESS(Boolean isRequired, boolean includeFriendlyName) Creates aRequestedAttributeobject for the CurrentAddress attribute.static RequestedAttributeCURRENT_FAMILY_NAME(Boolean isRequired, boolean includeFriendlyName) Creates aRequestedAttributeobject for the CurrentFamilyName attribute.static RequestedAttributeCURRENT_GIVEN_NAME(Boolean isRequired, boolean includeFriendlyName) Creates aRequestedAttributeobject for the CurrentGivenName attribute.static RequestedAttributeDATE_OF_BIRTH(Boolean isRequired, boolean includeFriendlyName) Creates aRequestedAttributeobject for the DateOfBirth attribute.static RequestedAttributeCreates aRequestedAttributeobject for the Gender attribute.static RequestedAttributePERSON_IDENTIFIER(Boolean isRequired, boolean includeFriendlyName) Creates aRequestedAttributeobject for the PersonIdentifier attribute.
-
Method Details
-
PERSON_IDENTIFIER
Creates aRequestedAttributeobject for the PersonIdentifier attribute.- Parameters:
isRequired- flag to tell whether the attribute is requiredincludeFriendlyName- flag that tells whether the friendly name should be included- Returns:
- a
RequestedAttributeobject representing the PersonIdentifier attribute
-
CURRENT_FAMILY_NAME
public static RequestedAttribute CURRENT_FAMILY_NAME(Boolean isRequired, boolean includeFriendlyName) Creates aRequestedAttributeobject for the CurrentFamilyName attribute.- Parameters:
isRequired- flag to tell whether the attribute is requiredincludeFriendlyName- flag that tells whether the friendly name should be included- Returns:
- a
RequestedAttributeobject representing the CurrentFamilyName attribute
-
CURRENT_GIVEN_NAME
public static RequestedAttribute CURRENT_GIVEN_NAME(Boolean isRequired, boolean includeFriendlyName) Creates aRequestedAttributeobject for the CurrentGivenName attribute.- Parameters:
isRequired- flag to tell whether the attribute is requiredincludeFriendlyName- flag that tells whether the friendly name should be included- Returns:
- a
RequestedAttributeobject representing the CurrentGivenName attribute
-
DATE_OF_BIRTH
Creates aRequestedAttributeobject for the DateOfBirth attribute.- Parameters:
isRequired- flag to tell whether the attribute is requiredincludeFriendlyName- flag that tells whether the friendly name should be included- Returns:
- a
RequestedAttributeobject representing the DateOfBirth attribute
-
GENDER
Creates aRequestedAttributeobject for the Gender attribute.- Parameters:
isRequired- flag to tell whether the attribute is requiredincludeFriendlyName- flag that tells whether the friendly name should be included- Returns:
- a
RequestedAttributeobject representing the Gender attribute
-
CURRENT_ADDRESS
Creates aRequestedAttributeobject for the CurrentAddress attribute.- Parameters:
isRequired- flag to tell whether the attribute is requiredincludeFriendlyName- flag that tells whether the friendly name should be included- Returns:
- a
RequestedAttributeobject representing the CurrentAddress attribute
-
create
public static RequestedAttribute create(String name, String friendlyName, String nameFormat, Boolean isRequired) Creates aRequestedAttributeobject for the given attribute name.- Parameters:
name- the attribute namefriendlyName- the attribute friendly name (optional)nameFormat- the name format (defaults tourn:oasis:names:tc:SAML:2.0:attrname-format:uriif the value is not supplied)isRequired- flag to tell whether the attribute is required- Returns:
- a
RequestedAttributeobject
-