Zuppler Users Client v0.0.5 ZupplerUsers.Auth.Plug

Plug that protects routes from unauthenticated access.

Notes

This plug will be injected in phoenix pipeline to protect api endpoints.

Token is retrieved:

  • either from header: authorization and value "Bearer #{token}"
  • either from body params: auth_token

After authorization the decoded user_info is assigned to the connection under the key user_info.

Summary

Functions

Callback implementation for c:Plug.call/2

Callback implementation for c:Plug.init/1

Functions

call(conn, opts)

Callback implementation for c:Plug.call/2.

init(opts)

Callback implementation for c:Plug.init/1.