Lockspire.Plug.VerifyToken (lockspire v1.1.2)

Copy Markdown

A plug that extracts and verifies a Bearer token from the Authorization header.

This plug performs "soft validation". It never halts the connection, but instead assigns a Lockspire.AccessToken struct to conn.assigns[:access_token]. If the token is invalid or missing, the struct will contain an error reason.