View Source Boruta.Ecto.Admin.Tokens (Boruta core v2.3.3)

Boruta.Ecto.Token resource administration

Summary

Functions

Link to this function

delete_inactive_tokens(until \\ DateTime.utc_now())

View Source
@spec delete_inactive_tokens(until :: DateTime.t()) ::
  {number_of_deleted_tokens :: integer(), nil}
Link to this function

list_active_tokens(queryable \\ Token)

View Source
@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{}, ...]