FastestMCP.Auth.Result (fastest_mcp v0.2.0)

Copy Markdown View Source

Normalized authentication result attached to the runtime context.

audiences and scopes are claims the authenticator has actually validated. Protected HTTP resources reject successful-looking results that do not prove the configured resource and required scopes.

The older verified_audiences and verified_scopes names remain accepted as compatibility aliases. New authenticators should use the canonical fields; contradictory canonical and compatibility values are rejected.

Summary

Types

t()

@type t() :: %FastestMCP.Auth.Result{
  audiences: [String.t()],
  auth: map(),
  capabilities: [any()],
  principal: any(),
  scopes: [String.t()],
  verified_audiences: [String.t()] | nil,
  verified_scopes: [String.t()] | nil
}