Skip to main content

Definition

Assembly: Microsoft.OData.Mcp.Authentication.dll Namespace: Microsoft.OData.Mcp.Authentication.Outbound Inheritance: System.Object

Syntax

Summary

Fetches an RFC 9728 protected resource metadata document over the handler-free "OAuth" named HttpClient, treating every well-known failure per AUTH-14: 401, 403, 404, and a failed parse are logged and swallowed; a timeout or 5xx is retried once before it becomes fatal.

Remarks

A new "OAuth" client is requested from IHttpClientFactory on every call rather than cached, matching the “Two named HttpClients” table in specs/v3/AUTHENTICATION.md: this client carries no delegating handler and is safe to create per request. Response bodies are never logged.

Examples

Constructors

.ctor

Initializes a new instance of the ProtectedResourceMetadataClient class.

Syntax

Parameters

Exceptions

.ctor Inherited

Inherited from object

Syntax

Methods

Equals Inherited Virtual

Inherited from object

Syntax

Parameters

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?

TryGetAsync

Attempts to fetch and parse the RFC 9728 protected resource metadata document at a well-known URL.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<ModelContextProtocol.Authentication.ProtectedResourceMetadata?> The parsed document on a 200 response with a well-formed body; otherwise null after a 401, 403, 404, unparseable body, or any other non-retryable non-success status.

Exceptions

Examples