AttestoPhoenix.Verifier.PresentationResponse (AttestoPhoenix v5.0.0)

Copy Markdown View Source

Normalized OID4VP response: plaintext direct_post, or the shared JWE envelope for direct_post.jwt and dc_api.jwt.

Summary

Functions

Normalize a direct-post request body map into a typed %PresentationResponse{} struct.

Types

t()

@type t() ::
  %AttestoPhoenix.Verifier.PresentationResponse{
    mode: :encrypted,
    response: String.t(),
    state: nil,
    vp_token: nil
  }
  | %AttestoPhoenix.Verifier.PresentationResponse{
      mode: :plaintext,
      response: nil,
      state: String.t(),
      vp_token: map()
    }

Functions

from_params(params)

@spec from_params(term()) :: {:ok, t()} | {:error, :malformed}

Normalize a direct-post request body map into a typed %PresentationResponse{} struct.