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 RequestedAttribute
Creates aRequestedAttribute
object for the given attribute name.static RequestedAttribute
CURRENT_ADDRESS
(Boolean isRequired, boolean includeFriendlyName) Creates aRequestedAttribute
object for the CurrentAddress attribute.static RequestedAttribute
CURRENT_FAMILY_NAME
(Boolean isRequired, boolean includeFriendlyName) Creates aRequestedAttribute
object for the CurrentFamilyName attribute.static RequestedAttribute
CURRENT_GIVEN_NAME
(Boolean isRequired, boolean includeFriendlyName) Creates aRequestedAttribute
object for the CurrentGivenName attribute.static RequestedAttribute
DATE_OF_BIRTH
(Boolean isRequired, boolean includeFriendlyName) Creates aRequestedAttribute
object for the DateOfBirth attribute.static RequestedAttribute
Creates aRequestedAttribute
object for the Gender attribute.static RequestedAttribute
PERSON_IDENTIFIER
(Boolean isRequired, boolean includeFriendlyName) Creates aRequestedAttribute
object for the PersonIdentifier attribute.
-
Method Details
-
PERSON_IDENTIFIER
Creates aRequestedAttribute
object 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
RequestedAttribute
object representing the PersonIdentifier attribute
-
CURRENT_FAMILY_NAME
public static RequestedAttribute CURRENT_FAMILY_NAME(Boolean isRequired, boolean includeFriendlyName) Creates aRequestedAttribute
object 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
RequestedAttribute
object representing the CurrentFamilyName attribute
-
CURRENT_GIVEN_NAME
public static RequestedAttribute CURRENT_GIVEN_NAME(Boolean isRequired, boolean includeFriendlyName) Creates aRequestedAttribute
object 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
RequestedAttribute
object representing the CurrentGivenName attribute
-
DATE_OF_BIRTH
Creates aRequestedAttribute
object 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
RequestedAttribute
object representing the DateOfBirth attribute
-
GENDER
Creates aRequestedAttribute
object 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
RequestedAttribute
object representing the Gender attribute
-
CURRENT_ADDRESS
Creates aRequestedAttribute
object 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
RequestedAttribute
object representing the CurrentAddress attribute
-
create
public static RequestedAttribute create(String name, String friendlyName, String nameFormat, Boolean isRequired) Creates aRequestedAttribute
object 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:uri
if the value is not supplied)isRequired
- flag to tell whether the attribute is required- Returns:
- a
RequestedAttribute
object
-