ArchAstro. SDK. Session
(archastro v0.3.5)
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.SDK.TokenServer; usernames and passwords
are never placed in GenServer configuration or ETS.
Summary
Functions
@spec login( ArchAstro.SDK.TokenServer.provider() | ArchAstro.SDK.TokenServer.server_ref(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, ArchAstro.SDK.Client.t()} | {:error, ArchAstro.SDK.Error.reason()}
@spec sign_out( ArchAstro.SDK.TokenServer.provider() | ArchAstro.SDK.TokenServer.server_ref(), String.t() ) :: :ok | {:error, ArchAstro.SDK.Error.reason()}