Class Voucher
java.lang.Object
com.nimbusds.openid.connect.sdk.assurance.evidences.Voucher
Voucher.
Related specifications:
- OpenID Connect for Identity Assurance 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionVoucher
(Name name, String birthdateString, Address address, Occupation occupation, Organization organization) Creates a new voucher. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the address elements.Returns the birthdate string.getName()
Returns the name.Returns the occupation.Returns the organisation.int
hashCode()
static Voucher
parse
(net.minidev.json.JSONObject jsonObject) Parses a voucher from the specified JSON objecassertEquals("Equality", voucher, Voucher.parse(jsonObject)); assertEquals("Hash code", voucher.hashCode(), Voucher.parse(jsonObject).hashCode());t.net.minidev.json.JSONObject
Returns a JSON object representation of this voucher.
-
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
Returns the name.- Returns:
- The name,
null
if not specified.
-
getBirthdateString
Returns the birthdate string.- Returns:
- The birthdate string,
null
if not specified.
-
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
Returns a JSON object representation of this voucher.- Returns:
- The JSON object.
-
equals
-
hashCode
-
parse
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 benull
.- Returns:
- The voucher.
- Throws:
ParseException
- If parsing failed.
-