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: :read

Missing or invalid tokens answer 401; valid tokens without the required scope answer 403.

Summary

Functions

call(conn, required_scope)

init(opts)

@spec init(keyword()) :: SyntropyWeb.ApiAuth.scope()