Coffrify.Resources.ApiTokens (Coffrify v0.9.0)

View Source

Delegated upload tokens — single-use credentials minted server-side and handed to client uploaders. Distinct from Coffrify.Resources.ApiKeys.

Summary

Functions

Create a token. Returns the value ONCE — store securely.

List delegated tokens.

Revoke a delegated token.

Functions

create(client, opts)

@spec create(Coffrify.t(), map() | keyword()) ::
  {:ok, map()} | {:error, Exception.t()}

Create a token. Returns the value ONCE — store securely.

list(client)

@spec list(Coffrify.t()) :: {:ok, map()} | {:error, Exception.t()}

List delegated tokens.

revoke(client, id)

@spec revoke(Coffrify.t(), String.t()) :: {:ok, map()} | {:error, Exception.t()}

Revoke a delegated token.