Mooncore.Auth.Plug
(mooncore v0.2.4)
Copy Markdown
Plug that extracts JWT token from the Authorization header and adds the decoded auth map to the connection.
The auth map is stored in both conn.assigns[:auth] and conn.auth
for compatibility with the Mooncore socket handler and action system.
Usage
Add to your router's plug pipeline:
plug Mooncore.Auth.Plug