CrossmintIdentityVerificationCredentials class final

Credentials for one verification session, read from an order's payment.preparation.kyc.

Comes in one of two shapes: Persona credentials, built with the default constructor, or credentials for a Crossmint verification session, built with CrossmintIdentityVerificationCredentials.session. Equality compares every field, so a rotated session secret counts as new credentials.

Constructors

CrossmintIdentityVerificationCredentials({required String inquiryId, String? sessionToken})
const
CrossmintIdentityVerificationCredentials.session({required String verificationId, required String clientSecret, String? deviceSessionKey})
Credentials for a Crossmint verification session.
const

Properties

hashCode → int
The hash code for this object.
no setteroverride
inquiryId → String?
Persona inquiry identifier. null for session credentials.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sessionToken → String?
Optional Persona session token. null for session credentials.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
Serializes to the shape the hosted page's credentials query param expects: {verificationId, clientSecret, deviceSessionKey?} for session credentials, {provider: 'persona', inquiryId, sessionToken?} otherwise.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

tryFromJson(Object? value) → CrossmintIdentityVerificationCredentials?
Parses an order's payment.preparation.kyc map. Returns null when the order does not need verification, or carries neither a usable session (verificationId and clientSecret) nor a usable Persona inquiry id.