Boruta.Ecto.Admin.Tokens (Boruta core v2.3.5)

View Source

Boruta.Ecto.Token resource administration

Summary

Functions

delete_inactive_tokens(until \\ DateTime.utc_now())

@spec delete_inactive_tokens(until :: DateTime.t()) ::
  {number_of_deleted_tokens :: integer(), nil}

list_active_tokens(queryable \\ Token)

@spec list_active_tokens(queryable :: Ecto.Queryable.t()) ::
  active_tokens :: [Boruta.Ecto.Token.t()]

Returns all active tokens given Ecto.Queryable (defaults to all).

Examples

iex> list_active_tokens()
[%Token{}, ...]