Noizu.MCP.Auth.Server.Config (Noizu MCP v0.1.6)

Copy Markdown View Source

Validated configuration for the authorization-server facade — the struct every plug in Noizu.MCP.Auth.Server receives.

Built by Noizu.MCP.Auth.Server.config/1. See that function for the option list; this module is the shape and the derived endpoint URLs.

Summary

Functions

Whether RS256 mode is in use — the only mode with a JWKS document.

Look a configured mount up by its canonical resource URI.

The canonical resource URIs this server may mint tokens for.

Adapter module and opts, for a Store call.

Absolute URL for a named endpoint: url(config, :token).

Types

signing()

@type signing() :: {:hs256, term()} | {:rs256, keyword()}

t()

@type t() :: %Noizu.MCP.Auth.Server.Config{
  access_token_ttl: pos_integer(),
  api_keys: keyword() | nil,
  authorization_code_ttl: pos_integer(),
  cimd: keyword(),
  consent: keyword(),
  dcr: keyword(),
  default_scope: [String.t()],
  extra_metadata: map(),
  issuer: String.t(),
  leeway: non_neg_integer(),
  login_state_ttl: pos_integer(),
  paths: map(),
  rate_limit: term() | nil,
  refresh_family_ttl: pos_integer() | nil,
  refresh_token_ttl: pos_integer(),
  resource_required: boolean(),
  resources: [map()],
  scopes_supported: [String.t()],
  signing: signing(),
  store: {module(), keyword()},
  track_access_tokens: boolean(),
  upstream: {module(), keyword()}
}

Functions

asymmetric?(config)

@spec asymmetric?(t()) :: boolean()

Whether RS256 mode is in use — the only mode with a JWKS document.

resource(config, uri)

@spec resource(t(), String.t()) :: {:ok, map()} | :error

Look a configured mount up by its canonical resource URI.

resource_uris(config)

@spec resource_uris(t()) :: [String.t()]

The canonical resource URIs this server may mint tokens for.

store(config)

@spec store(t()) :: {module(), keyword()}

Adapter module and opts, for a Store call.

url(config, name)

@spec url(t(), atom()) :: String.t()

Absolute URL for a named endpoint: url(config, :token).