Class RequestedAttributeTemplates

java.lang.Object
se.swedenconnect.opensaml.eidas.ext.RequestedAttributeTemplates

public class RequestedAttributeTemplates extends Object
Utility methods for use when RequestedAttribute elements are inserted in an AuthnRequest extension.
Author:
Martin Lindström
  • Method Details

    • PERSON_IDENTIFIER

      public static RequestedAttribute PERSON_IDENTIFIER(Boolean isRequired, boolean includeFriendlyName)
      Creates a RequestedAttribute object for the PersonIdentifier attribute.
      Parameters:
      isRequired - flag to tell whether the attribute is required
      includeFriendlyName - 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 a RequestedAttribute object for the CurrentFamilyName attribute.
      Parameters:
      isRequired - flag to tell whether the attribute is required
      includeFriendlyName - 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 a RequestedAttribute object for the CurrentGivenName attribute.
      Parameters:
      isRequired - flag to tell whether the attribute is required
      includeFriendlyName - flag that tells whether the friendly name should be included
      Returns:
      a RequestedAttribute object representing the CurrentGivenName attribute
    • DATE_OF_BIRTH

      public static RequestedAttribute DATE_OF_BIRTH(Boolean isRequired, boolean includeFriendlyName)
      Creates a RequestedAttribute object for the DateOfBirth attribute.
      Parameters:
      isRequired - flag to tell whether the attribute is required
      includeFriendlyName - flag that tells whether the friendly name should be included
      Returns:
      a RequestedAttribute object representing the DateOfBirth attribute
    • GENDER

      public static RequestedAttribute GENDER(Boolean isRequired, boolean includeFriendlyName)
      Creates a RequestedAttribute object for the Gender attribute.
      Parameters:
      isRequired - flag to tell whether the attribute is required
      includeFriendlyName - flag that tells whether the friendly name should be included
      Returns:
      a RequestedAttribute object representing the Gender attribute
    • CURRENT_ADDRESS

      public static RequestedAttribute CURRENT_ADDRESS(Boolean isRequired, boolean includeFriendlyName)
      Creates a RequestedAttribute object for the CurrentAddress attribute.
      Parameters:
      isRequired - flag to tell whether the attribute is required
      includeFriendlyName - 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 a RequestedAttribute object for the given attribute name.
      Parameters:
      name - the attribute name
      friendlyName - the attribute friendly name (optional)
      nameFormat - the name format (defaults to urn: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