ash_authentication/dev/dev_server/session.ex
James Harton a939dde9b9
feat(PasswordAuthentication): Registration and authentication with local credentials (#4)
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.
2022-10-25 11:07:07 +13:00

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