Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.

Commit 0f96912

Browse files
authored
Merge pull request #511 from josephdecock/joe/dcr-constants
Add client metadata for dcr
2 parents dea739b + adb253f commit 0f96912

File tree

2 files changed

+58
-6
lines changed

2 files changed

+58
-6
lines changed

src/Client/Messages/DynamicClientRegistrationDocument.cs

+51-5
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,43 @@ public class DynamicClientRegistrationDocument
137137
[JsonPropertyName(OidcConstants.ClientMetadata.Scope)]
138138
public string? Scope { get; set; }
139139

140+
/// <summary>
141+
/// List of post-logout redirection URIs for use in the end session
142+
/// endpoint.
143+
/// </summary>
144+
[JsonPropertyName(OidcConstants.ClientMetadata.PostLogoutRedirectUris)]
145+
public ICollection<Uri> PostLogoutRedirectUris { get; set; } = new HashSet<Uri>();
146+
147+
/// <summary>
148+
/// RP URL that will cause the RP to log itself out when rendered in an
149+
/// iframe by the OP.
150+
/// </summary>
151+
[JsonPropertyName(OidcConstants.ClientMetadata.FrontChannelLogoutUri)]
152+
public string? FrontChannelLogoutUri { get; set; }
153+
154+
/// <summary>
155+
/// Boolean value specifying whether the RP requires that a sid (session ID)
156+
/// query parameter be included to identify the RP session with the OP when
157+
/// the frontchannel_logout_uri is used.
158+
/// </summary>
159+
[JsonPropertyName(OidcConstants.ClientMetadata.FrontChannelLogoutSessionRequired)]
160+
public bool? FrontChannelLogoutSessionRequired { get; set; }
161+
162+
/// <summary>
163+
/// RP URL that will cause the RP to log itself out when sent a Logout Token
164+
/// by the OP.
165+
/// </summary>
166+
[JsonPropertyName(OidcConstants.ClientMetadata.BackchannelLogoutUri)]
167+
public string? BackChannelLogoutUri { get; set; }
168+
169+
/// <summary>
170+
/// Boolean value specifying whether the RP requires that a sid (session ID)
171+
/// Claim be included in the Logout Token to identify the RP session with
172+
/// the OP when the backchannel_logout_uri is used.e
173+
/// </summary>
174+
[JsonPropertyName(OidcConstants.ClientMetadata.BackchannelLogoutSessionRequired)]
175+
public bool? BackchannelLogoutSessionRequired { get; set; }
176+
140177
/// <summary>
141178
/// A software statement containing client metadata values about the client
142179
/// software as claims. This is a string value containing the entire signed
@@ -188,6 +225,14 @@ public class DynamicClientRegistrationDocument
188225
[JsonPropertyName(OidcConstants.ClientMetadata.RequestObjectEncryptionEncryption)]
189226
public string? RequestObjectEncryptionEncryption { get; set; }
190227

228+
/// <summary>
229+
/// Boolean value specifying whether authorization requests must be
230+
/// protected as signed request objects and provided through either the
231+
/// request or request_uri parameters.
232+
/// </summary>
233+
[JsonPropertyName(OidcConstants.ClientMetadata.RequireSignedRequestObject)]
234+
public bool? RequireSignedRequestObject { get; set; }
235+
191236
[JsonPropertyName(OidcConstants.ClientMetadata.TokenEndpointAuthenticationMethod)]
192237
public string? TokenEndpointAuthenticationMethod { get; set; }
193238

@@ -213,14 +258,15 @@ public class DynamicClientRegistrationDocument
213258
public ICollection<string> DefaultAcrValues { get; set; } = new HashSet<string>();
214259

215260
/// <summary>
216-
/// URI using the https scheme that a third party can use to initiate a login by the relying party.
261+
/// URI using the https scheme that a third party can use to initiate a
262+
/// login by the relying party.
217263
/// </summary>
218264
/// <remarks>
219-
/// The URI must accept requests via both GET and POST.
220-
/// The client must understand the <c>login_hint</c> and iss parameters and should support the
221-
/// <c>target_link_uri</c> parameter.
265+
/// The URI must accept requests via both GET and POST. The client must
266+
/// understand the <c>login_hint</c> and iss parameters and should support
267+
/// the <c>target_link_uri</c> parameter.
222268
/// </remarks>
223-
[JsonPropertyName(OidcConstants.ClientMetadata.InitiateLoginUris)]
269+
[JsonPropertyName(OidcConstants.ClientMetadata.InitiateLoginUri)]
224270
public Uri? InitiateLoginUri { get; set; }
225271

226272
/// <summary>

src/OidcConstants.cs

+7-1
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,11 @@ public static class ClientMetadata
240240
public const string Jwks = "jwks";
241241
public const string SectorIdentifierUri = "sector_identifier_uri";
242242
public const string Scope = "scope";
243+
public const string PostLogoutRedirectUris = "post_logout_redirect_uris";
244+
public const string FrontChannelLogoutUri = "frontchannel_logout_uri";
245+
public const string FrontChannelLogoutSessionRequired = "frontchannel_logout_session_required";
246+
public const string BackchannelLogoutUri = "backchannel_logout_uri";
247+
public const string BackchannelLogoutSessionRequired = "backchannel_logout_session_required";
243248
public const string SoftwareId = "software_id";
244249
public const string SoftwareStatement = "software_statement";
245250
public const string SoftwareVersion = "software_version";
@@ -249,7 +254,7 @@ public static class ClientMetadata
249254
public const string DefaultMaxAge = "default_max_age";
250255
public const string RequireAuthenticationTime = "require_auth_time";
251256
public const string DefaultAcrValues = "default_acr_values";
252-
public const string InitiateLoginUris = "initiate_login_uri";
257+
public const string InitiateLoginUri = "initiate_login_uri";
253258
public const string RequestUris = "request_uris";
254259
public const string IdentityTokenSignedResponseAlgorithm = "id_token_signed_response_alg";
255260
public const string IdentityTokenEncryptedResponseAlgorithm = "id_token_encrypted_response_alg";
@@ -260,6 +265,7 @@ public static class ClientMetadata
260265
public const string RequestObjectSigningAlgorithm = "request_object_signing_alg";
261266
public const string RequestObjectEncryptionAlgorithm = "request_object_encryption_alg";
262267
public const string RequestObjectEncryptionEncryption = "request_object_encryption_enc";
268+
public const string RequireSignedRequestObject = "require_signed_request_object";
263269
public const string AlwaysUseDPoPBoundAccessTokens = "dpop_bound_access_tokens";
264270
}
265271

0 commit comments

Comments
 (0)