Skip to main content

Definition

Assembly: Microsoft.OData.Mcp.Tools.dll Namespace: Microsoft.OData.Mcp.Tools.Commands Inheritance: System.Object

Syntax

Summary

Everything the odata-mcp add wizard collected about how the generated start command should authenticate.

Remarks

Per AUTH-5 this is a top-level type rather than a tuple or a nested class, because it crosses three methods — the prompts that fill it, the connection test that turns it into OutboundOAuthOptions, and the command builder that turns it into flags. There is deliberately no client secret property. Per specs/v3/AUTHENTICATION.md the wizard never writes a client secret into MCP configuration at all: it prints an instruction to set ODataMcpAuthConstants.ClientSecretEnvironmentVariable in the environment that launches the host, which start reads. AddCommandAuthSettings.ApiKey, AddCommandAuthSettings.BasicPassword, and AddCommandAuthSettings.AuthToken<em>are</em> written, and each is warned about when it is.

Examples

Constructors

.ctor

Syntax

.ctor Inherited

Inherited from object

Syntax

Properties

ApiKey

Gets or sets the raw API key, or null when the operator chose another path.

Syntax

Property Value

Type: string?

ApiKeyHeader

Gets or sets the header name AddCommandAuthSettings.ApiKey is sent in.

Syntax

Property Value

Type: string?

AuthServer

Gets or sets the authorization server issuer the operator supplied, or null when discovery found one on its own.

Syntax

Property Value

Type: string?

AuthToken

Gets or sets the bearer token the operator pasted, or null for every other path.

Syntax

Property Value

Type: string?

BasicPassword

Gets or sets the HTTP Basic password.

Syntax

Property Value

Type: string?

BasicUser

Gets or sets the HTTP Basic user name.

Syntax

Property Value

Type: string?

ClientId

Gets or sets the OAuth client identifier, or null when the authorization server registers one dynamically.

Syntax

Property Value

Type: string?

Grant

Gets or sets the grant the generated command pins, or null for a non-OAuth path.

Syntax

Property Value

Type: System.Nullable<Microsoft.OData.Mcp.Authentication.Outbound.OutboundGrantKind?>?

Scopes

Gets or sets the space-delimited scope list, or null when the challenge or the protected resource metadata already supplies one.

Syntax

Property Value

Type: string?

TokenCachePath

Gets or sets the token cache directory the operator chose, or null to leave the default operating system credential store in place.

Syntax

Property Value

Type: string?

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

ToOutboundOptions

Turns these settings into the outbound options the start command would build from the same flags, so a connection test exercises the real authentication path rather than a simplified one.

Syntax

Returns

Type: Microsoft.OData.Mcp.Authentication.Outbound.OutboundOAuthOptions The options, with ODataMcpAuthConstants.ClientSecretEnvironmentVariable and ODataMcpAuthConstants.IdTokenEnvironmentVariable already folded in.

Examples

Remarks

The environment is read here for the same reason start reads it: a client credentials test that ignored ODATA_MCP_CLIENT_SECRET would fail for a reason the operator has already been told how to fix.

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?