AttestationProofCreator

class AttestationProofCreator(loadKeyAttestation: suspend (OpenId4VciClient.KeyAttestationInput) -> KmmResult<JwsCompactTyped<KeyAttestationJwt>>) : ProofCreator(source)

Creates proofs of the attestation proof type (OpenID4VCI 1.0, Appendix F.3): exactly one key attestation in JWT format (Appendix D.1), loaded with loadKeyAttestation, without a proof of possession of the attested keys. The c_nonce is passed to loadKeyAttestation as KeyAttestationInput.clientNonce, as it has to be the nonce of the key attestation if the issuer has a Nonce Endpoint (Appendix F.3).

Creating the proof fails if loadKeyAttestation fails. Creates no proof if the issuer does not accept the attestation proof type for the requested credential.

Constructors

Link copied to clipboard
constructor(loadKeyAttestation: suspend (OpenId4VciClient.KeyAttestationInput) -> KmmResult<JwsCompactTyped<KeyAttestationJwt>>)

Functions

Link copied to clipboard
open suspend override fun invoke(credentialIssuer: String, credentialFormat: SupportedCredentialFormat, clientId: String, clientNonce: String?): KmmResult<CredentialRequestProofContainer?>

Creates the proof for a credential of credentialFormat to be requested from credentialIssuer.