Skip to main content

Definition

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

Syntax

Summary

The consent-request payload passed to OutboundOAuthOptions.ConsentPresenter, and carried by OAuthConsentRequiredException, when interactive sign-in is required to complete an outbound OAuth grant.

Remarks

Per AUTH-12 this type never carries a device_code, an access token, a refresh token, or a PKCE code_verifier — only what a human or an MCP client needs to complete sign-in out of band. Fields that must stay off this type (the pending grant’s device_code, interval, code_verifier, expected state, and live HttpListener) live instead on OutboundOAuthClient’s internal pending-grant state. Every URL on this type is server-controlled: it comes from an authorization server that a malicious protected resource could have named. Because a consent URL is handed to ShellExecute by the stdio presenter and to an MCP client as an elicitation URL, the constructor is the chokepoint that refuses any scheme other than https, or http on a loopback host, before either can happen.

Examples

Constructors

.ctor

Initializes a new instance of the OutboundConsentRequest class.

Syntax

Parameters

Exceptions

Remarks

The scheme check runs on both URLs and it runs here rather than at each presenter, because there is no presenter this instance is guaranteed to reach: it is also carried by OAuthConsentRequiredException to whatever host catches it.

.ctor Inherited

Inherited from object

Syntax

Properties

ElicitationId

Gets the identifier this consent request correlates an MCP elicitation to.

Syntax

Property Value

Type: string

Kind

Gets the grant kind this consent request is completing.

Syntax

Property Value

Type: Microsoft.OData.Mcp.Authentication.Outbound.OutboundGrantKind

Message

Gets the human-readable message describing what the operator or the LLM should do.

Syntax

Property Value

Type: string

Url

Gets the absolute URL to open to complete sign-in: an authorization URI for interactive grants, or a device verification URI for the device code grant.

Syntax

Property Value

Type: System.Uri

UserCode

Gets the short code a human types at OutboundConsentRequest.VerificationUri, or null when the grant kind does not use one.

Syntax

Property Value

Type: string?

VerificationUri

Gets the verification URI a human is directed to enter OutboundConsentRequest.UserCode at, or null when the grant kind does not use one.

Syntax

Property Value

Type: System.Uri?

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?