OpenId4VciKtorClient
Parameters
the app's ktor client, i.e. with its engine, cookie storage (advised to be persistent, to keep the session at the issuing service alive after receiving the auth code) and logging. The requests are sent with a copy that does not follow redirects, see OAuth2KtorClient for the plugins it must not have.
implements OAuth 2.0, holding the client_id (also the issuer of credential proofs), the redirectUrl, which needs to be registered by the OS for this application, so redirection back from browser works, and the state of authorization requests
implements OID4VCI protocol, i.e. creates credential requests with proofs of possession for the credential key material, and parses the credential responses
authenticates the client with OAuth 2.0 Attestation-Based Client Authentication, e.g. with a Wallet Instance Attestation (WIA), or null to not use it
the key material the access tokens and refresh tokens get bound to, by default the key of clientAttestation, else an ephemeral key, see OAuth2KtorClient
validates signed issuer metadata, see loadIssuerMetadata: configure it with the anchors of the WRPAC providers, and of the WRPRC providers
Deprecated
Pass the app's HttpClient instead of engine, cookiesStorage and httpClientConfig, the OAuth2Client, which holds the client ID for credential proofs too, and the client attestation as ClientAttestation
Parameters
ktor engine to use to make requests to issuing service.
Callers are advised to implement a persistent cookie storage, to keep the session at the issuing service alive after receiving the auth code.
Additional configuration for building the HTTP client, e.g. callers may enable logging.
Implements OID4VCI protocol, cryptoService provides proof of possession for credential key material.
Internal OAuth 2.0 client passed on to oauth2Client, with the (deprecated) clientId from oid4vciClient. The client_id of the OAuth 2.0 client in oauth2Client is the issuer of credential proofs.
OAuth 2.0 client to use during the protocol run.