Definition
Assembly: Microsoft.OData.Mcp.Authentication.dll Namespace: Microsoft.OData.Mcp.Authentication.Outbound Inheritance: System.Net.Http.DelegatingHandlerSyntax
Summary
The"OData" named client’s delegating handler: it attaches whatever credential the operator
configured, and when none was configured it drives OutboundOAuthClient through the send
path — attach a still-valid token, refresh one that has fallen inside the skew, or run a grant off the
challenge the resource answered with.
Remarks
This handler belongs on the"OData" client only. The "OAuth" client — protected resource
metadata, authorization server metadata, device authorization, token, refresh — is registered without it,
so a 401 on a well-known document can never re-enter discovery and recurse.
OutboundOAuthOptions.ConsentPresenter is read at the moment a grant is needed and never
captured in the constructor, because a host swaps a blocking stderr presenter for an MCP elicitation once
its session is up.