DigitalCredential
@ExperimentalDigitalCredentialApi
class DigitalCredential : Credential
Represents the user's digital credential, generally used for verification or sign-in purposes.
Notice, this class does not necessarily always represents a successful digital credential. Depending on the protocol in your request, the credentialJson may contain a failure response generated from the provider. Therefore, please follow the protocol specification to parse the credentialJson and determine the failure / success response. For example, here is the error response definition for the OpenID for Verifiable Presentations protocol.
When you make an OpenID4VP request for multiple credentials, you may receive a GetCredentialResponse containing a list of DigitalCredential. These credentials may be aggregated from one or more providers. Because some responses may contain an OpenID4VP error, you should check each individual DigitalCredential to ensure it satisfies your overall request.
NOTE: For non-protocol errors (system-level infrastructure failures, provider crashes, or generic CredMan exceptions), the transaction will NOT return any partial credentials at all. Such failures trigger an immediate transaction abort where zero credentials are yielded.
Summary
Constants |
|
|---|---|
const String |
The type value for public key credential related operations. |
Public constructors |
|---|
DigitalCredential(credentialJson: String)Constructs a |
Public properties |
|
|---|---|
String |
the digital credential in the JSON format; the latest format is defined at https://wicg.github.io/digital-credentials/#the-digitalcredential-interface |
Inherited properties |
||||
|---|---|---|---|---|
|
Constants
TYPE_DIGITAL_CREDENTIAL
const val TYPE_DIGITAL_CREDENTIAL: String
The type value for public key credential related operations.
Public constructors
DigitalCredential
DigitalCredential(credentialJson: String)
Constructs a DigitalCredential.
| Parameters | |
|---|---|
credentialJson: String |
the digital credential in the JSON format; the latest format is defined at https://wicg.github.io/digital-credentials/#the-digitalcredential-interface |
| Throws | |
|---|---|
IllegalArgumentException |
if the |
Public properties
credentialJson
val credentialJson: String
the digital credential in the JSON format; the latest format is defined at https://wicg.github.io/digital-credentials/#the-digitalcredential-interface