Skip to main content

Definition

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

Syntax

Summary

One parsed WWW-Authenticate challenge: the authentication scheme, the OAuth-relevant auth-params promoted to typed properties, and the complete, case-insensitive parameter set exactly as it arrived.

Remarks

Instances are produced by WwwAuthenticateParser and are immutable once created. OAuthChallenge.ResourceClientId carries the challenge client_id, which is the <em>resource</em> application id (Microsoft Graph advertises ODataMcpAuthConstants.MicrosoftGraphResourceAppId). It is never our public client id and must never be copied onto an outbound OAuth client id; that is why no member of this type is named ClientId.

Examples

Constructors

.ctor

Syntax

.ctor Inherited

Inherited from object

Syntax

Properties

AuthorizationUri

The challenge authorization_uri as an absolute URI, or null when the parameter is absent or not an absolute URI.

Syntax

Property Value

Type: System.Uri?

Remarks

A non-absolute value is still available verbatim through OAuthChallenge.Parameters.

Error

The RFC 6750 error code, such as invalid_token, or null when absent.

Syntax

Property Value

Type: string?

ErrorDescription

The RFC 6750 error_description human readable text, or null when absent.

Syntax

Property Value

Type: string?

Parameters

Every auth-param of the challenge, including the ones promoted to typed properties, keyed case-insensitively with values unescaped but otherwise verbatim.

Syntax

Property Value

Type: System.Collections.Generic.IReadOnlyDictionary<string, string>

Remarks

Defaults to an empty dictionary so callers never have to null-check it.

Realm

The RFC 7235 realm, or null when absent. An advertised but empty realm (Microsoft Graph sends realm="") is preserved as an empty string.

Syntax

Property Value

Type: string?

ResourceClientId

The challenge client_id, which identifies the protected <em>resource</em> application, or null when absent.

Syntax

Property Value

Type: string?

Remarks

Per AUTH-13 this value is never used as the client id of the OAuth client this process runs.

ResourceMetadata

The RFC 9728 resource_metadata location as an absolute URI, or null when the parameter is absent or not an absolute URI.

Syntax

Property Value

Type: System.Uri?

Remarks

A non-absolute value is still available verbatim through OAuthChallenge.Parameters.

Scheme

The authentication scheme, such as Bearer or Basic, exactly as the server spelled it.

Syntax

Property Value

Type: string

Remarks

Schemes are case-insensitive; compare with OrdinalIgnoreCase or use OAuthChallenge}).

Scope

The space-delimited scope the server asks for, or null when absent.

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

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?