GameServerWeb.Auth.OptionalPipeline (game_server_web v1.0.941)

Copy Markdown

Guardian pipeline for optional API JWT authentication.

Unlike GameServerWeb.Auth.Pipeline, this pipeline does NOT require authentication — it simply loads the user if a valid Bearer token is present in the Authorization header, otherwise continues with current_scope set to an anonymous scope.

Use this on public endpoints that can optionally enrich responses when the caller is authenticated (e.g. showing user progress on achievements).

Summary

Functions

Callback implementation for Plug.call/2.

Callback implementation for Plug.init/1.

Functions

call(conn, opts)

Callback implementation for Plug.call/2.

init(opts)

Callback implementation for Plug.init/1.