using System;
using System.Text.Json.Serialization;
namespace CarpaNet.OAuth;
///
/// OAuth 2.0 Authorization Server Metadata (RFC 8414).
///
public sealed class OAuthAuthorizationServerMetadata
{
///
/// The authorization server's issuer identifier (URL).
///
[JsonPropertyName("issuer")]
public string Issuer { get; set; } = string.Empty;
///
/// URL of the authorization endpoint.
///
[JsonPropertyName("authorization_endpoint")]
public string AuthorizationEndpoint { get; set; } = string.Empty;
///
/// URL of the token endpoint.
///
[JsonPropertyName("token_endpoint")]
public string TokenEndpoint { get; set; } = string.Empty;
///
/// URL of the server's JWK Set document.
///
[JsonPropertyName("jwks_uri")]
public string? JwksUri { get; set; }
///
/// URL of the pushed authorization request endpoint.
///
[JsonPropertyName("pushed_authorization_request_endpoint")]
public string? PushedAuthorizationRequestEndpoint { get; set; }
///
/// Whether the server requires pushed authorization requests.
///
[JsonPropertyName("require_pushed_authorization_requests")]
public bool RequirePushedAuthorizationRequests { get; set; }
///
/// DPoP signing algorithms supported by the server.
///
[JsonPropertyName("dpop_signing_alg_values_supported")]
public string[]? DpopSigningAlgValuesSupported { get; set; }
///
/// Token endpoint authentication methods supported.
///
[JsonPropertyName("token_endpoint_auth_methods_supported")]
public string[]? TokenEndpointAuthMethodsSupported { get; set; }
///
/// Token endpoint authentication signing algorithms supported.
///
[JsonPropertyName("token_endpoint_auth_signing_alg_values_supported")]
public string[]? TokenEndpointAuthSigningAlgValuesSupported { get; set; }
///
/// URL of the revocation endpoint.
///
[JsonPropertyName("revocation_endpoint")]
public string? RevocationEndpoint { get; set; }
///
/// URL of the introspection endpoint.
///
[JsonPropertyName("introspection_endpoint")]
public string? IntrospectionEndpoint { get; set; }
///
/// Response types supported.
///
[JsonPropertyName("response_types_supported")]
public string[]? ResponseTypesSupported { get; set; }
///
/// Response modes supported.
///
[JsonPropertyName("response_modes_supported")]
public string[]? ResponseModesSupported { get; set; }
///
/// Whether the authorization response includes the iss parameter.
///
[JsonPropertyName("authorization_response_iss_parameter_supported")]
public bool AuthorizationResponseIssParameterSupported { get; set; }
///
/// Scopes supported by the server.
///
[JsonPropertyName("scopes_supported")]
public string[]? ScopesSupported { get; set; }
///
/// Code challenge methods supported (PKCE).
///
[JsonPropertyName("code_challenge_methods_supported")]
public string[]? CodeChallengeMethodsSupported { get; set; }
///
/// Whether the server supports client ID metadata document discovery.
///
[JsonPropertyName("client_id_metadata_document_supported")]
public bool ClientIdMetadataDocumentSupported { get; set; }
///
/// Protected resources (PDS URLs) associated with this authorization server.
///
[JsonPropertyName("protected_resources")]
public string[]? ProtectedResources { get; set; }
}