Skip to main content

Definition

Assembly: Microsoft.OData.Mcp.Core.dll Namespace: Microsoft.OData.Mcp.Core.Configuration Inheritance: System.Object

Syntax

Microsoft.OData.Mcp.Core.Configuration.ODataAuthenticationConfiguration

Summary

Authentication configuration for connecting to OData services.

Constructors

.ctor

Syntax

public ODataAuthenticationConfiguration()

.ctor Inherited

Inherited from object

Syntax

public Object()

Properties

ApiKey

Gets or sets the API key for API key authentication.

Syntax

public string ApiKey { get; set; }

Property Value

Type: string? The API key value.

ApiKeyHeader

Gets or sets the API key header name.

Syntax

public string ApiKeyHeader { get; set; }

Property Value

Type: string The name of the header to include the API key in.

BasicAuth

Gets or sets the basic authentication credentials.

Syntax

public Microsoft.OData.Mcp.Core.Configuration.BasicAuthenticationCredentials BasicAuth { get; set; }

Property Value

Type: Microsoft.OData.Mcp.Core.Configuration.BasicAuthenticationCredentials? The username and password for basic authentication.

BearerToken

Gets or sets the bearer token for bearer token authentication.

Syntax

public string BearerToken { get; set; }

Property Value

Type: string? The bearer token value.

OAuth2

Gets or sets the OAuth2 configuration.

Syntax

public Microsoft.OData.Mcp.Core.Configuration.OAuth2Configuration OAuth2 { get; set; }

Property Value

Type: Microsoft.OData.Mcp.Core.Configuration.OAuth2Configuration? Configuration for OAuth2 client credentials flow.

Type

Gets or sets the authentication type for the OData service.

Syntax

public Microsoft.OData.Mcp.Core.Configuration.ODataAuthenticationType Type { get; set; }

Property Value

Type: Microsoft.OData.Mcp.Core.Configuration.ODataAuthenticationType? The type of authentication to use when connecting to the OData service.

Methods

Clone

Creates a copy of this configuration.

Syntax

public Microsoft.OData.Mcp.Core.Configuration.ODataAuthenticationConfiguration Clone()

Returns

Type: Microsoft.OData.Mcp.Core.Configuration.ODataAuthenticationConfiguration A new instance with the same settings.

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

MergeWith

Merges another configuration into this one.

Syntax

public void MergeWith(Microsoft.OData.Mcp.Core.Configuration.ODataAuthenticationConfiguration other)

Parameters

NameTypeDescription
otherMicrosoft.OData.Mcp.Core.Configuration.ODataAuthenticationConfigurationThe configuration to merge.

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?

Validate

Validates the authentication configuration.

Syntax

public System.Collections.Generic.IEnumerable<string> Validate()

Returns

Type: System.Collections.Generic.IEnumerable<string> A collection of validation errors, or empty if the configuration is valid.