Chooses the client identity presented to an authorization server, in
the MCP authorization spec's order (compiled only with :finch):
- Pre-registered -
pre_registered[issuer]from the OAuth options. When pre-registered clients are configured but none is for this issuer, the server has moved to another authorization server and the flow stops with:authorization_server_changed(OA-6): credentials are bound to their issuer, and falling back to another method would silently re-identify the client. - Client ID Metadata Document - when the authorization server
advertises
client_id_metadata_document_supported: trueand:client_metadata_urlis set, that URL is the client id (seeConduitMcp.Client.OAuth.CIMD). - Dynamic client registration (RFC 7591; deprecated in MCP
2026-07-28, kept for older authorization servers) - when the
metadata has a
registration_endpoint. The request declaresapplication_type(nativefor a loopback or custom-scheme redirect URI, elseweb, unlessclient_metadatasays otherwise),grant_types: ["authorization_code", "refresh_token"],response_types: ["code"]andtoken_endpoint_auth_method: "none". The registered client is kept in the token store under the issuer (ConduitMcp.Client.OAuth.TokenStore.put_client/3) and reused while itsredirect_urisinclude the redirect URI, so a client registered with one authorization server is never shown to another. - Otherwise
:no_registration_method.
Summary
Functions
Resolves the client identity for authorization server issuer with
validated metadata.
Types
Functions
@spec resolve(ConduitMcp.Client.OAuth.Config.t(), String.t(), map(), keyword()) :: {:ok, t()} | {:error, ConduitMcp.Client.OAuth.Error.t()}
Resolves the client identity for authorization server issuer with
validated metadata.
Options
:redirect_uri- the redirect URI of the flow (needed to register).:register- whether dynamic registration may send a request (defaulttrue;falseonly reuses a stored registration, as a token refresh does).