Attesto.CredentialResponse (Attesto v1.12.2)

Copy Markdown View Source

OID4VCI Credential Response (draft-ietf-oauth-openid4vci §8.3).

Build the string-keyed response body returned by a credential endpoint. This module is pure and conn-free; credential issuance is the caller's concern.

Summary

Functions

Build an immediate issuance response.

Build a deferred issuance response.

Functions

build(credentials, opts \\ [])

@spec build(
  term(),
  keyword()
) :: %{required(String.t()) => term()}

Build an immediate issuance response.

A bare credential value is wrapped in a one-element list. A list of values is emitted in the same order, with each value under a "credential" key.

deferred(transaction_id, opts \\ [])

@spec deferred(
  term(),
  keyword()
) :: %{required(String.t()) => term()}

Build a deferred issuance response.