SyntropyWeb.Plugs.ApiAuth
(syntropy v0.3.0)
Copy Markdown
Enforces Syntropy external API auth when token auth is enabled.
Each API pipeline declares its scope class:
plug SyntropyWeb.Plugs.ApiAuth, scope: :readMissing or invalid tokens answer 401; valid tokens without the required scope answer 403.
Summary
Functions
@spec call(Plug.Conn.t(), SyntropyWeb.ApiAuth.scope()) :: Plug.Conn.t()
@spec init(keyword()) :: SyntropyWeb.ApiAuth.scope()