View Source Plausible.Auth.UserSession (Plausible v0.0.1)

Schema for storing user session data.

Summary

Types

@type t() :: %Plausible.Auth.UserSession{
  __meta__: term(),
  device: term(),
  id: term(),
  inserted_at: term(),
  last_used_at: term(),
  timeout_at: term(),
  token: term(),
  user: term(),
  user_id: term()
}

Functions

Link to this function

new_session(user, device, now \\ NaiveDateTime.utc_now(:second))

View Source
@spec timeout_duration() :: Duration.t()
Link to this function

touch_session(session, now \\ NaiveDateTime.utc_now(:second))

View Source
@spec touch_session(t() | Ecto.Changeset.t(), NaiveDateTime.t()) :: Ecto.Changeset.t()