mirror of
https://github.com/team-alembic/ash_authentication.git
synced 2024-09-21 22:02:52 +12:00
a939dde9b9
This is missing a bunch of features that you probably want to use (eg confirmation, password resets), but it's a pretty good place to put a stake in the sand and say it works.
17 lines
398 B
Elixir
17 lines
398 B
Elixir
defmodule DevServer.Session do
|
|
@moduledoc """
|
|
Does nothing but own an ETS table for the session to be stored in.
|
|
"""
|
|
|
|
use GenServer
|
|
|
|
@doc false
|
|
def start_link(opts), do: GenServer.start_link(__MODULE__, opts, [])
|
|
|
|
@doc false
|
|
@impl true
|
|
def init(_) do
|
|
table_ref = :ets.new(__MODULE__, [:named_table, :public, read_concurrency: true])
|
|
{:ok, table_ref, :hibernate}
|
|
end
|
|
end
|