MCP.OAuth2.Registration (fnord v0.8.82)

View Source

RFC 7591 Dynamic Client Registration for OAuth2. Allows automatic registration of native clients with OAuth providers.

Summary

Functions

Register a new OAuth client with the authorization server.

Functions

register(registration_endpoint, opts \\ [])

@spec register(
  String.t(),
  keyword()
) ::
  {:ok, %{client_id: String.t(), client_secret: String.t() | nil}}
  | {:error, term()}

Register a new OAuth client with the authorization server.

Uses RFC 7591 Dynamic Client Registration to automatically obtain a client_id without requiring manual pre-registration.

Parameters

  • registration_endpoint: The registration endpoint URL from discovery
  • opts: Optional overrides

Returns

  • {:ok, %{client_id: String.t(), client_secret: String.t() | nil}}

  • {:error, reason}