-
Notifications
You must be signed in to change notification settings - Fork 673
Expand file tree
/
Copy pathDynamicClientRegistrationRequest.cs
More file actions
66 lines (57 loc) · 2.47 KB
/
DynamicClientRegistrationRequest.cs
File metadata and controls
66 lines (57 loc) · 2.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using System.Diagnostics.CodeAnalysis;
using System.Text.Json.Serialization;
namespace ModelContextProtocol.Authentication;
/// <summary>
/// Represents a client registration request for OAuth 2.0 Dynamic Client Registration (RFC 7591).
/// </summary>
internal sealed class DynamicClientRegistrationRequest
{
/// <summary>
/// Gets or sets the redirect URIs for the client.
/// </summary>
[JsonPropertyName("redirect_uris")]
public required string[] RedirectUris { get; init; }
/// <summary>
/// Gets or sets the token endpoint authentication method.
/// </summary>
[JsonPropertyName("token_endpoint_auth_method")]
public string? TokenEndpointAuthMethod { get; init; }
/// <summary>
/// Gets or sets the grant types that the client will use.
/// </summary>
[JsonPropertyName("grant_types")]
public string[]? GrantTypes { get; init; }
/// <summary>
/// Gets or sets the response types that the client will use.
/// </summary>
[JsonPropertyName("response_types")]
public string[]? ResponseTypes { get; init; }
/// <summary>
/// Gets or sets the human-readable name of the client.
/// </summary>
[JsonPropertyName("client_name")]
public string? ClientName { get; init; }
/// <summary>
/// Gets or sets the URL of the client's home page.
/// </summary>
[JsonPropertyName("client_uri")]
public string? ClientUri { get; init; }
/// <summary>
/// Gets or sets the scope values that the client will use.
/// </summary>
[JsonPropertyName("scope")]
public string? Scope { get; init; }
/// <summary>
/// Gets or sets the application type for the client, as defined in OpenID Connect Dynamic Client Registration 1.0.
/// </summary>
/// <remarks>
/// Valid values are "native" and "web". Per the MCP specification, MCP clients MUST specify an appropriate
/// application type during Dynamic Client Registration. This field is automatically populated by the SDK
/// based on the redirect URI if not explicitly set via <see cref="DynamicClientRegistrationOptions.ApplicationType"/>.
/// Native applications (desktop, mobile, CLI, localhost web apps) should use "native".
/// Web applications (remote browser-based) should use "web".
/// </remarks>
[JsonPropertyName("application_type")]
[Experimental(Experimentals.DcrApplicationType_DiagnosticId, UrlFormat = Experimentals.DcrApplicationType_Url)]
public string? ApplicationType { get; init; }
}