ArchAstro. Session
(archastro v0.2.0)
Copy Markdown
Helpers for session-scoped authentication in LiveView and other multi-user apps.
Login credentials exist only on the caller's stack. Successful bearer tokens
are handed to the configured ArchAstro.TokenServer; usernames and passwords
are never placed in GenServer configuration or ETS.
Summary
Functions
@spec login( ArchAstro.TokenServer.provider() | ArchAstro.TokenServer.server_ref(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, ArchAstro.Client.t()} | {:error, ArchAstro.Error.reason()}
@spec sign_out( ArchAstro.TokenServer.provider() | ArchAstro.TokenServer.server_ref(), String.t() ) :: :ok | {:error, ArchAstro.Error.reason()}