Soundboard.Accounts.ApiToken (soundboard v1.7.0)

API access token bound to a user.

The token hash is used for verification. The plaintext token is also persisted so the Settings UI can display and copy active tokens after creation.

Summary

Types

t()

@type t() :: %Soundboard.Accounts.ApiToken{
  __meta__: term(),
  id: integer() | nil,
  inserted_at: NaiveDateTime.t() | nil,
  label: String.t() | nil,
  last_used_at: NaiveDateTime.t() | nil,
  revoked_at: NaiveDateTime.t() | nil,
  token: String.t() | nil,
  token_hash: String.t() | nil,
  updated_at: NaiveDateTime.t() | nil,
  user: Soundboard.Accounts.User.t() | Ecto.Association.NotLoaded.t() | nil,
  user_id: integer() | nil
}

Functions

changeset(token, attrs)