-
Notifications
You must be signed in to change notification settings - Fork 720
Expand file tree
/
Copy pathAuthorizationServerMetadata.cs
More file actions
82 lines (69 loc) · 2.78 KB
/
Copy pathAuthorizationServerMetadata.cs
File metadata and controls
82 lines (69 loc) · 2.78 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
using System.Text.Json.Serialization;
namespace ModelContextProtocol.Authentication;
/// <summary>
/// Represents the metadata about an OAuth authorization server.
/// </summary>
internal sealed class AuthorizationServerMetadata
{
/// <summary>
/// The authorization endpoint URI.
/// </summary>
[JsonPropertyName("authorization_endpoint")]
public Uri AuthorizationEndpoint { get; set; } = null!;
/// <summary>
/// The token endpoint URI.
/// </summary>
[JsonPropertyName("token_endpoint")]
public Uri TokenEndpoint { get; set; } = null!;
/// <summary>
/// The registration endpoint URI.
/// </summary>
[JsonPropertyName("registration_endpoint")]
public Uri? RegistrationEndpoint { get; set; }
/// <summary>
/// The revocation endpoint URI.
/// </summary>
[JsonPropertyName("revocation_endpoint")]
public Uri? RevocationEndpoint { get; set; }
/// <summary>
/// The response types supported by the authorization server.
/// </summary>
[JsonPropertyName("response_types_supported")]
public List<string>? ResponseTypesSupported { get; set; }
/// <summary>
/// The grant types supported by the authorization server.
/// </summary>
[JsonPropertyName("grant_types_supported")]
public List<string>? GrantTypesSupported { get; set; }
/// <summary>
/// The token endpoint authentication methods supported by the authorization server.
/// </summary>
[JsonPropertyName("token_endpoint_auth_methods_supported")]
public List<string>? TokenEndpointAuthMethodsSupported { get; set; }
/// <summary>
/// The code challenge methods supported by the authorization server.
/// </summary>
[JsonPropertyName("code_challenge_methods_supported")]
public List<string>? CodeChallengeMethodsSupported { get; set; }
/// <summary>
/// The issuer URI of the authorization server.
/// </summary>
[JsonPropertyName("issuer")]
public Uri? Issuer { get; set; }
/// <summary>
/// The scopes supported by the authorization server.
/// </summary>
[JsonPropertyName("scopes_supported")]
public List<string>? ScopesSupported { get; set; }
/// <summary>
/// Indicates if the server supports OAuth Client ID Metadata Documents.
/// </summary>
[JsonPropertyName("client_id_metadata_document_supported")]
public bool ClientIdMetadataDocumentSupported { get; set; }
/// <summary>
/// Indicates whether the authorization server includes the <c>iss</c> parameter in authorization responses
/// as defined in <see href="https://datatracker.ietf.org/doc/html/rfc9207">RFC 9207</see>.
/// </summary>
[JsonPropertyName("authorization_response_iss_parameter_supported")]
public bool AuthorizationResponseIssParameterSupported { get; set; }
}