Class RequestedAttribute

java.lang.Object
se.swedenconnect.spring.saml.idp.attributes.UserAttribute
se.swedenconnect.spring.saml.idp.attributes.RequestedAttribute
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ImplicitRequestedAttribute

public class RequestedAttribute extends UserAttribute
A representation of a "requested attribute".
Author:
Martin Lindström
See Also:
  • Constructor Details

    • RequestedAttribute

      public RequestedAttribute(String id)
      Constructor.
      Parameters:
      id - the attribute ID (name)
    • RequestedAttribute

      public RequestedAttribute(String id, String friendlyName)
      Constructor.
      Parameters:
      id - the attribute ID (name)
      friendlyName - the attribute friendly name
    • RequestedAttribute

      public RequestedAttribute(String id, String friendlyName, boolean isRequired)
      Constructor.
      Parameters:
      id - the attribute ID (name)
      friendlyName - the attribute friendly name
      isRequired - whether the attribute is "required", meaning that the requester requires it to be included in a resulting assertion
    • RequestedAttribute

      public RequestedAttribute(RequestedAttribute attribute)
      Constructor creating an RequestedAttribute from an OpenSAML eIDAS RequestedAttribute.
      Parameters:
      attribute - the eIDAS RequestedAttribute
    • RequestedAttribute

      public RequestedAttribute(org.opensaml.saml.saml2.metadata.RequestedAttribute attribute)
      Constructor creating an RequestedAttribute from an OpenSAML SAML metadata RequestedAttribute.
      Parameters:
      attribute - the RequestedAttribute
  • Method Details

    • isRequired

      public boolean isRequired()
      Predicate telling whether the attribute is "required", meaning that the requester requires it to be included in a resulting assertion.
      Returns:
      true if the attribute is required and false otherwise
    • setRequired

      public void setRequired(boolean isRequired)
      Assigns whether the attribute is "required", meaning that the requester requires it to be included in a resulting assertion.
      Parameters:
      isRequired - the is-required flag
    • toString

      public String toString()
      Overrides:
      toString in class UserAttribute