Pure candidate construction and semantic validation for MCP OAuth metadata.
Decoding must use StrictJSON before these functions are called. Validators
project only fields used by PtcRunner's supported authorization profile and
reject DPoP, signed Protected Resource Metadata, PAR requirements, and
unsupported client authentication before browser interaction.
Summary
Functions
@spec select_scopes(map(), map(), PtcRunner.Kernel.MCPOAuth.Authority.t()) :: {:ok, MapSet.t(binary())} | {:error, :authorization_required}
@spec validate_authorization_server( map(), PtcRunner.Kernel.MCPOAuth.Authority.t(), binary() ) :: {:ok, map()} | {:error, :invalid_authorization_server_metadata}
@spec validate_client_document( map(), PtcRunner.Kernel.MCPOAuth.Authority.t(), binary(), binary() ) :: {:ok, map()} | {:error, :invalid_client_metadata_document}
@spec validate_protected_resource( map(), PtcRunner.Kernel.MCPOAuth.Authority.t(), binary() ) :: {:ok, map()} | {:error, :invalid_protected_resource_metadata}