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

Boruta.Ecto.Token resource administration

Link to this section Summary

Link to this section Functions

Link to this function

delete_inactive_tokens(until \\ DateTime.utc_now())

View Source

Specs

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

list_active_tokens(queryable \\ Token)

View Source

Specs

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