Class SignerIdentityAttributeValue

All Implemented Interfaces:
Serializable

public class SignerIdentityAttributeValue extends SignerIdentityAttribute
Representation of the value of a signer attribute.

When a sign requester sends a SignRequest message it includes requirements on the signer regarding authenticated attributes. This class represents these requirements.

Currently, the only supported attribute type is SAML. A missing type will represent SAML (AbstractIdentityAttribute.getType()).

Author:
Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
See Also:
  • Field Details

    • DEFAULT_NAME_FORMAT

      public static final String DEFAULT_NAME_FORMAT
      The default name format to use.
      See Also:
    • DEFAULT_ATTRIBUTE_VALUE_TYPE

      public static final String DEFAULT_ATTRIBUTE_VALUE_TYPE
      The default attribute value type to use. We assume SAML's xs:string.
      See Also:
  • Constructor Details

    • SignerIdentityAttributeValue

      public SignerIdentityAttributeValue()
      Default constructor.
    • SignerIdentityAttributeValue

      public SignerIdentityAttributeValue(String type, String name, String value, String nameFormat, String attributeValueType)
      Constructor.
      Parameters:
      type - the type of attribute (if null, SAML is assumed)
      name - the name of the attribute
      value - the value of the attribute
      nameFormat - the name format
      attributeValueType - the value type
  • Method Details

    • getValue

      public String getValue()
      Gets the attribute value (in its string representation).
      Returns:
      the attribute value (in its string representation)
    • setValue

      public void setValue(String value)
      Assigns the attribute value (in its string representation).
      Parameters:
      value - the attribute value (in its string representation)
    • getNameFormat

      public String getNameFormat()
      Gets the name format for the attribute. When the attribute type is SAML the default is "urn:oasis:names:tc:SAML:2.0:attrname-format:uri".
      Returns:
      the name format for the attribute
    • setNameFormat

      public void setNameFormat(String nameFormat)
      Assigns the name format for the attribute. When the attribute type is SAML the default is "urn:oasis:names:tc:SAML:2.0:attrname-format:uri".
      Parameters:
      nameFormat - the (SAML) name format
    • getAttributeValueType

      public String getAttributeValueType()
      Gets the type for the attribute value. When SAML attributes are represented, this holds the XSI type without the namespace prefix. The default in those cases is "string".
      Returns:
      the attribute value type
    • setAttributeValueType

      public void setAttributeValueType(String attributeValueType)
      Assigns the type for the attribute value. When SAML attributes are represented, this holds the XSI type without the namespace prefix. The default in those cases is "string".
      Parameters:
      attributeValueType - the attribute value type
    • builder

    • toString

      public String toString()
      Overrides:
      toString in class SignerIdentityAttribute