Skip to main content

Definition

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

Syntax

Summary

Registers this process as an OAuth client at an authorization server’s RFC 7591 registration_endpoint, so an operator who has no pre-registered application can still sign in.

Remarks

The request goes out on the handler-free "OAuth" named client, the same one discovery and every token request use, so a 401 from a registration endpoint can never re-enter the outbound auth handler and recurse. The caller persists the returned identifier on the cached TokenContainer — per step 9 of the discovery algorithm — so the next process start reuses it instead of registering a second client. Per AUTH-12 a returned client_secret is never logged.

Examples

Constructors

.ctor

Initializes a new instance of the DynamicClientRegistrar class.

Syntax

Parameters

Exceptions

.ctor Inherited

Inherited from object

Syntax

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

RegisterAsync

Registers a new client and returns the identifier the grant then runs as.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<ModelContextProtocol.Authentication.DynamicClientRegistrationResponse> The registration response, whose ClientId is guaranteed non-empty.

Exceptions

Examples

Remarks

response_types is sent only when grantTypes includes authorization_code, because RFC 7591 ties the two together and an authorization server that sees ["code"] from a device-code-only client may reject the registration. Both 201 and 200 are accepted: RFC 7591 section 3.2.1 specifies 201, and deployments answer 200 often enough that refusing it would strand operators for no security gain.

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?