Definition
Assembly: Microsoft.OData.Mcp.Tools.dll Namespace: Microsoft.OData.Mcp.Tools.Commands Inheritance: System.ObjectSyntax
Summary
Everything theodata-mcp add wizard collected about how the generated start command should
authenticate.
Remarks
PerAUTH-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
objectSyntax
Properties
ApiKey
Gets or sets the raw API key, ornull 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, ornull when
discovery found one on its own.
Syntax
Property Value
Type:string?
AuthToken
Gets or sets the bearer token the operator pasted, ornull 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, ornull when the authorization server
registers one dynamically.
Syntax
Property Value
Type:string?
Grant
Gets or sets the grant the generated command pins, ornull 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, ornull 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, ornull to leave the
default operating system credential store in place.
Syntax
Property Value
Type:string?
Methods
Equals Inherited Virtual
Inherited from
objectSyntax
Parameters
Returns
Type:bool
Equals Inherited
Inherited from
objectSyntax
Parameters
Returns
Type:bool
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
Returns
Type:bool
ToOutboundOptions
Turns these settings into the outbound options thestart 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 reasonstart 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
objectSyntax
Returns
Type:string?