Class RequestedCertificateAttribute

java.lang.Object
se.idsec.signservice.integration.core.AbstractIdentityAttribute
se.idsec.signservice.integration.certificate.RequestedCertificateAttribute
All Implemented Interfaces:
Serializable

public class RequestedCertificateAttribute extends AbstractIdentityAttribute
Represents a requested certificate attribute. The sign requester states that a given principal attribute should be mapped into a certificate attribute. This class represents how the requirements for certificate attributes are represented.

This Java implementation uses one class for this purpose even though there are three different attribute types. The reason is that we want to be JSON processor libary agnostic, and working with interfaces and subclasses is hard then.

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

    • RequestedCertificateAttribute

      public RequestedCertificateAttribute()
      Default constructor.
    • RequestedCertificateAttribute

      public RequestedCertificateAttribute(RequestedCertificateAttributeType type)
      Constructor creating the object with the given type.
      Parameters:
      type - the type
  • Method Details

    • builder

      Returns a builder for RequestedCertificateAttribute objects.
      Returns:
      a RequestedCertificateAttribute builder
    • setType

      public void setType(String type)
      Assigns the identity attribute type.
      Overrides:
      setType in class AbstractIdentityAttribute
      Parameters:
      type - the attribute type
    • setType

      public void setType(RequestedCertificateAttributeType type)
      Assigns the attribute type.
      Parameters:
      type - the attribute type
    • getDefaultValue

      public String getDefaultValue()
      Gets the default value to use if no mapping can be found.
      Returns:
      the value to use if no mapping can be found, or null if no default value has been assigned
    • setDefaultValue

      public void setDefaultValue(String defaultValue)
      Assigns te default value to use if no mapping can be found.
      Parameters:
      defaultValue - the value to use if no mapping can be found
    • getFriendlyName

      public String getFriendlyName()
      Gets the friendly name of attribute.
      Returns:
      the "friendly name" of the attribute for display purposes or null if not present
    • setFriendlyName

      public void setFriendlyName(String friendlyName)
      Assigns the friendly name of attribute.
      Parameters:
      friendlyName - the "friendly name" of the attribute for display purposes
    • getRequired

      public Boolean getRequired()
      Gets whether this attribute must be provided.
      Returns:
      tells whether the attribute is required
    • setRequired

      public void setRequired(Boolean required)
      Assigns whether this attribute must be provided.
      Parameters:
      required - whether the attribute is required
    • toString

      public String toString()
      Overrides:
      toString in class AbstractIdentityAttribute