java.lang.Object
com.nimbusds.openid.connect.sdk.assurance.evidences.Voucher

public class Voucher extends Object
Voucher.

Related specifications:

  • OpenID Connect for Identity Assurance 1.0
  • Constructor Details

    • Voucher

      public Voucher(Name name, String birthdateString, Address address, Occupation occupation, Organization organization)
      Creates a new voucher.
      Parameters:
      name - The name, null if not specified.
      birthdateString - The birthday string, null if not specified.
      address - The address elements, null if not specified.
      occupation - The occupation, null if not specified.
      organization - The organisation, null if not specified.
  • Method Details

    • getName

      public Name getName()
      Returns the name.
      Returns:
      The name, null if not specified.
    • getBirthdateString

      Returns the birthdate string.
      Returns:
      The birthdate string, null if not specified.
    • getAddress

      public Address getAddress()
      Returns the address elements.
      Returns:
      The address elements, null if not specified.
    • getOccupation

      Returns the occupation.
      Returns:
      The occupation, null if not specified.
    • getOrganization

      Returns the organisation.
      Returns:
      The organisation, null if not specified.
    • toJSONObject

      public net.minidev.json.JSONObject toJSONObject()
      Returns a JSON object representation of this voucher.
      Returns:
      The JSON object.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • parse

      public static Voucher parse(net.minidev.json.JSONObject jsonObject) throws ParseException
      Parses a voucher from the specified JSON objecassertEquals("Equality", voucher, Voucher.parse(jsonObject)); assertEquals("Hash code", voucher.hashCode(), Voucher.parse(jsonObject).hashCode());t.
      Parameters:
      jsonObject - The JSON object. Must not be null.
      Returns:
      The voucher.
      Throws:
      ParseException - If parsing failed.