OpenPayments.Types.ContinuationToken (open_payments_elixir v1.0.0)

Copy Markdown View Source

The credential in a grant response's continue.access_token field.

The pinned schema requires a string value and permits additional JSON data, retained in extensions. Value spelling is preserved without applying the outgoing request header's token68 validation. This credential is typed separately from issued resource access tokens and makes no network requests.

Inspection omits values and extensions. Explicit map/JSON exports include the token. Errors retain safe field names. Validate manually modified structs with validate/1; to_map/1 converts shape without validating it.

Summary

Functions

Decodes a continuation credential and preserves permitted extension data.

Converts to protocol fields, including the token value, without validating.

Validates token and JSON extension fields without retaining values in errors.

Types

t()

@type t() :: %OpenPayments.Types.ContinuationToken{
  extensions: %{optional(String.t()) => term()},
  value: String.t()
}

Functions

from_map(data)

@spec from_map(map()) :: {:ok, t()} | {:error, OpenPayments.Error.t()}

Decodes a continuation credential and preserves permitted extension data.

to_map(token)

@spec to_map(t()) :: map()

Converts to protocol fields, including the token value, without validating.

validate(token)

@spec validate(t()) :: :ok | {:error, OpenPayments.Error.t()}

Validates token and JSON extension fields without retaining values in errors.