Class IdentityEvidence
java.lang.Object
com.nimbusds.openid.connect.sdk.assurance.evidences.IdentityEvidence
- All Implemented Interfaces:
net.minidev.json.JSONAware
- Direct Known Subclasses:
DocumentEvidence
,ElectronicRecordEvidence
,ElectronicSignatureEvidence
,IDDocumentEvidence
,QESEvidence
,UtilityBillEvidence
,VouchEvidence
The base abstract class for identity evidences.
Related specifications:
- OpenID Connect for Identity Assurance 1.0, section 5.1.1.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
IdentityEvidence
(IdentityEvidenceType evidenceType, List<Attachment> attachments) Creates a new evidence with the specified type. -
Method Summary
Modifier and TypeMethodDescriptionprotected static void
ensureType
(IdentityEvidenceType expectedType, net.minidev.json.JSONObject jsonObject) Ensures thetype
member of the specified JSON object matches the expected.Returns the optional attachments.Returns the evidence type.static IdentityEvidence
parse
(net.minidev.json.JSONObject jsonObject) Parses an identity evidence from the specified JSON object.Casts this identity evidence to a document evidence.Casts this identity evidence to an electronic record evidence.Casts this identity evidence to an electronic signature evidence.Casts this identity evidence to an ID document evidence.net.minidev.json.JSONObject
Returns a JSON object representation of this evidence.Casts this identity evidence to a QES evidence.Casts this identity evidence to a utility bill evidence.Casts this identity evidence to a vouch evidence.
-
Constructor Details
-
IdentityEvidence
Creates a new evidence with the specified type.- Parameters:
evidenceType
- The evidence type. Must not benull
.attachments
- The optional attachments,null
if not specified.
-
-
Method Details
-
getEvidenceType
Returns the evidence type.- Returns:
- The evidence type.
-
getAttachments
Returns the optional attachments.- Returns:
- The attachments,
null
if not specified.
-
toDocumentEvidence
Casts this identity evidence to a document evidence.- Returns:
- The document evidence.
-
toIDDocumentEvidence
Casts this identity evidence to an ID document evidence.- Returns:
- The ID document evidence.
-
toElectronicRecordEvidence
Casts this identity evidence to an electronic record evidence.- Returns:
- The electronic record evidence.
-
toVouchEvidence
Casts this identity evidence to a vouch evidence.- Returns:
- The vouch evidence.
-
toUtilityBillEvidence
Casts this identity evidence to a utility bill evidence.- Returns:
- The utility bill evidence.
-
toElectronicSignatureEvidence
Casts this identity evidence to an electronic signature evidence.- Returns:
- The electronic signature evidence.
-
toQESEvidence
Casts this identity evidence to a QES evidence.- Returns:
- The QES evidence.
-
toJSONObject
Returns a JSON object representation of this evidence.- Returns:
- The JSON object.
-
toJSONString
- Specified by:
toJSONString
in interfacenet.minidev.json.JSONAware
-
parse
Parses an identity evidence from the specified JSON object.- Parameters:
jsonObject
- The JSON object. Must not benull
.- Returns:
- A
DocumentEvidence
,IDDocumentEvidence
,ElectronicRecordEvidence
,VouchEvidence
,QESEvidence
,ElectronicSignatureEvidence
, orUtilityBillEvidence
instance. - Throws:
ParseException
- If parsing failed or the evidence type isn't supported.
-
ensureType
protected static void ensureType(IdentityEvidenceType expectedType, net.minidev.json.JSONObject jsonObject) throws ParseException Ensures thetype
member of the specified JSON object matches the expected.- Parameters:
expectedType
- The expected type. Must not benull
.jsonObject
- The JSON object. Must not benull
.- Throws:
ParseException
- If parsing failed or mismatch.
-