-
Notifications
You must be signed in to change notification settings - Fork 409
/
OpenIdConnectConfiguration.cs
640 lines (558 loc) · 37 KB
/
OpenIdConnectConfiguration.cs
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using Microsoft.IdentityModel.Json;
using Microsoft.IdentityModel.Logging;
using Microsoft.IdentityModel.Tokens;
namespace Microsoft.IdentityModel.Protocols.OpenIdConnect
{
/// <summary>
/// Contains OpenIdConnect configuration that can be populated from a json string.
/// </summary>
[JsonObject]
public class OpenIdConnectConfiguration : BaseConfiguration
{
private const string _className = "Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfiguration";
/// <summary>
/// Deserializes the json string into an <see cref="OpenIdConnectConfiguration"/> object.
/// </summary>
/// <param name="json">json string representing the configuration.</param>
/// <returns><see cref="OpenIdConnectConfiguration"/> object representing the configuration.</returns>
/// <exception cref="ArgumentNullException">If 'json' is null or empty.</exception>
/// <exception cref="ArgumentException">If 'json' fails to deserialize.</exception>
public static OpenIdConnectConfiguration Create(string json)
{
if (string.IsNullOrEmpty(json))
throw LogHelper.LogArgumentNullException(nameof(json));
LogHelper.LogVerbose(LogMessages.IDX21808, json);
return new OpenIdConnectConfiguration(json);
}
/// <summary>
/// Serializes the <see cref="OpenIdConnectConfiguration"/> object to a json string.
/// </summary>
/// <param name="configuration"><see cref="OpenIdConnectConfiguration"/> object to serialize.</param>
/// <returns>json string representing the configuration object.</returns>
/// <exception cref="ArgumentNullException">If 'configuration' is null.</exception>
public static string Write(OpenIdConnectConfiguration configuration)
{
if (configuration == null)
throw LogHelper.LogArgumentNullException(nameof(configuration));
LogHelper.LogVerbose(LogMessages.IDX21809);
return JsonConvert.SerializeObject(configuration);
}
/// <summary>
/// Initializes an new instance of <see cref="OpenIdConnectConfiguration"/>.
/// </summary>
public OpenIdConnectConfiguration()
{
}
/// <summary>
/// Initializes an new instance of <see cref="OpenIdConnectConfiguration"/> from a json string.
/// </summary>
/// <param name="json">a json string containing the metadata</param>
/// <exception cref="ArgumentNullException">If 'json' is null or empty.</exception>
public OpenIdConnectConfiguration(string json)
{
if(string.IsNullOrEmpty(json))
throw LogHelper.LogArgumentNullException(nameof(json));
try
{
LogHelper.LogVerbose(LogMessages.IDX21806, json, LogHelper.MarkAsNonPII(_className));
JsonConvert.PopulateObject(json, this);
}
catch (Exception ex)
{
throw LogHelper.LogExceptionMessage(new ArgumentException(LogHelper.FormatInvariant(LogMessages.IDX21815, json, LogHelper.MarkAsNonPII(_className)), ex));
}
}
/// <summary>
/// When deserializing from JSON any properties that are not defined will be placed here.
/// </summary>
[JsonExtensionData]
public virtual IDictionary<string, object> AdditionalData { get; } = new Dictionary<string, object>();
/// <summary>
/// Gets the collection of 'acr_values_supported'
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.AcrValuesSupported, Required = Required.Default)]
public ICollection<string> AcrValuesSupported { get; } = new Collection<string>();
/// <summary>
/// Gets or sets the 'authorization_endpoint'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.AuthorizationEndpoint, Required = Required.Default)]
public string AuthorizationEndpoint { get; set; }
/// <summary>
/// Gets or sets the 'check_session_iframe'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.CheckSessionIframe, Required = Required.Default)]
public string CheckSessionIframe { get; set; }
/// <summary>
/// Gets the collection of 'claims_supported'
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.ClaimsSupported, Required = Required.Default)]
public ICollection<string> ClaimsSupported { get; } = new Collection<string>();
/// <summary>
/// Gets the collection of 'claims_locales_supported'
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.ClaimsLocalesSupported, Required = Required.Default)]
public ICollection<string> ClaimsLocalesSupported { get; } = new Collection<string>();
/// <summary>
/// Gets or sets the 'claims_parameter_supported'
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.ClaimsParameterSupported, Required = Required.Default)]
public bool ClaimsParameterSupported { get; set; }
/// <summary>
/// Gets the collection of 'claim_types_supported'
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.ClaimTypesSupported, Required = Required.Default)]
public ICollection<string> ClaimTypesSupported { get; } = new Collection<string>();
/// <summary>
/// Gets the collection of 'display_values_supported'
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.DisplayValuesSupported, Required = Required.Default)]
public ICollection<string> DisplayValuesSupported { get; } = new Collection<string>();
/// <summary>
/// Gets or sets the 'end_session_endpoint'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.EndSessionEndpoint, Required = Required.Default)]
public string EndSessionEndpoint { get; set; }
/// <summary>
/// Gets or sets the 'frontchannel_logout_session_supported'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.FrontchannelLogoutSessionSupported, Required = Required.Default)]
public string FrontchannelLogoutSessionSupported { get; set; }
/// <summary>
/// Gets or sets the 'frontchannel_logout_supported'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.FrontchannelLogoutSupported, Required = Required.Default)]
public string FrontchannelLogoutSupported { get; set; }
/// <summary>
/// Gets the collection of 'grant_types_supported'
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.GrantTypesSupported, Required = Required.Default)]
public ICollection<string> GrantTypesSupported { get; } = new Collection<string>();
/// <summary>
/// Boolean value specifying whether the OP supports HTTP-based logout. Default is false.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.HttpLogoutSupported, Required = Required.Default)]
public bool HttpLogoutSupported { get; set; }
/// <summary>
/// Gets the collection of 'id_token_encryption_alg_values_supported'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.IdTokenEncryptionAlgValuesSupported, Required = Required.Default)]
public ICollection<string> IdTokenEncryptionAlgValuesSupported { get; } = new Collection<string>();
/// <summary>
/// Gets the collection of 'id_token_encryption_enc_values_supported'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.IdTokenEncryptionEncValuesSupported, Required = Required.Default)]
public ICollection<string> IdTokenEncryptionEncValuesSupported { get; } = new Collection<string>();
/// <summary>
/// Gets the collection of 'id_token_signing_alg_values_supported'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.IdTokenSigningAlgValuesSupported, Required = Required.Default)]
public ICollection<string> IdTokenSigningAlgValuesSupported { get; } = new Collection<string>();
/// <summary>
/// Gets or sets the 'introspection_endpoint'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.IntrospectionEndpoint, Required = Required.Default)]
public string IntrospectionEndpoint { get; set; }
/// <summary>
/// Gets the collection of 'introspection_endpoint_auth_methods_supported'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.IntrospectionEndpointAuthMethodsSupported, Required = Required.Default)]
public ICollection<string> IntrospectionEndpointAuthMethodsSupported { get; } = new Collection<string>();
/// <summary>
/// Gets the collection of 'introspection_endpoint_auth_signing_alg_values_supported'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.IntrospectionEndpointAuthSigningAlgValuesSupported, Required = Required.Default)]
public ICollection<string> IntrospectionEndpointAuthSigningAlgValuesSupported { get; } = new Collection<string>();
/// <summary>
/// Gets or sets the 'issuer'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.Issuer, Required = Required.Default)]
public override string Issuer { get; set; }
/// <summary>
/// Gets or sets the 'jwks_uri'
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.JwksUri, Required = Required.Default)]
public string JwksUri { get; set; }
/// <summary>
/// Gets or sets the <see cref="JsonWebKeySet"/>
/// </summary>
public JsonWebKeySet JsonWebKeySet {get; set;}
/// <summary>
/// Boolean value specifying whether the OP can pass a sid (session ID) query parameter to identify the RP session at the OP when the logout_uri is used. Dafault Value is false.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.LogoutSessionSupported, Required = Required.Default)]
public bool LogoutSessionSupported { get; set; }
/// <summary>
/// Gets or sets the 'op_policy_uri'
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.OpPolicyUri, Required = Required.Default)]
public string OpPolicyUri { get; set; }
/// <summary>
/// Gets or sets the 'op_tos_uri'
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.OpTosUri, Required = Required.Default)]
public string OpTosUri { get; set; }
/// <summary>
/// Gets or sets the 'registration_endpoint'
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.RegistrationEndpoint, Required = Required.Default)]
public string RegistrationEndpoint { get; set; }
/// <summary>
/// Gets the collection of 'request_object_encryption_alg_values_supported'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.RequestObjectEncryptionAlgValuesSupported, Required = Required.Default)]
public ICollection<string> RequestObjectEncryptionAlgValuesSupported { get; } = new Collection<string>();
/// <summary>
/// Gets the collection of 'request_object_encryption_enc_values_supported'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.RequestObjectEncryptionEncValuesSupported, Required = Required.Default)]
public ICollection<string> RequestObjectEncryptionEncValuesSupported { get; } = new Collection<string>();
/// <summary>
/// Gets the collection of 'request_object_signing_alg_values_supported'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.RequestObjectSigningAlgValuesSupported, Required = Required.Default)]
public ICollection<string> RequestObjectSigningAlgValuesSupported { get; } = new Collection<string>();
/// <summary>
/// Gets or sets the 'request_parameter_supported'
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.RequestParameterSupported, Required = Required.Default)]
public bool RequestParameterSupported { get; set; }
/// <summary>
/// Gets or sets the 'request_uri_parameter_supported'
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.RequestUriParameterSupported, Required = Required.Default)]
public bool RequestUriParameterSupported { get; set; }
/// <summary>
/// Gets or sets the 'require_request_uri_registration'
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.RequireRequestUriRegistration, Required = Required.Default)]
public bool RequireRequestUriRegistration { get; set; }
/// <summary>
/// Gets the collection of 'response_modes_supported'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.ResponseModesSupported, Required = Required.Default)]
public ICollection<string> ResponseModesSupported { get; } = new Collection<string>();
/// <summary>
/// Gets the collection of 'response_types_supported'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.ResponseTypesSupported, Required = Required.Default)]
public ICollection<string> ResponseTypesSupported { get; } = new Collection<string>();
/// <summary>
/// Gets or sets the 'service_documentation'
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.ServiceDocumentation, Required = Required.Default)]
public string ServiceDocumentation { get; set; }
/// <summary>
/// Gets the collection of 'scopes_supported'
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.ScopesSupported, Required = Required.Default)]
public ICollection<string> ScopesSupported { get; } = new Collection<string>();
/// <summary>
/// Gets the <see cref="ICollection{SecurityKey}"/> that the IdentityProvider indicates are to be used signing tokens.
/// </summary>
[JsonIgnore]
public override ICollection<SecurityKey> SigningKeys { get; } = new Collection<SecurityKey>();
/// <summary>
/// Gets the collection of 'subject_types_supported'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.SubjectTypesSupported, Required = Required.Default)]
public ICollection<string> SubjectTypesSupported { get; } = new Collection<string>();
/// <summary>
/// Gets or sets the 'token_endpoint'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.TokenEndpoint, Required = Required.Default)]
public override string TokenEndpoint { get; set; }
/// <summary>
/// Gets the collection of 'token_endpoint_auth_methods_supported'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.TokenEndpointAuthMethodsSupported, Required = Required.Default)]
public ICollection<string> TokenEndpointAuthMethodsSupported { get; } = new Collection<string>();
/// <summary>
/// Gets the collection of 'token_endpoint_auth_signing_alg_values_supported'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.TokenEndpointAuthSigningAlgValuesSupported, Required = Required.Default)]
public ICollection<string> TokenEndpointAuthSigningAlgValuesSupported { get; } = new Collection<string>();
/// <summary>
/// Gets the collection of 'ui_locales_supported'
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.UILocalesSupported, Required = Required.Default)]
public ICollection<string> UILocalesSupported { get; } = new Collection<string>();
/// <summary>
/// Gets or sets the 'user_info_endpoint'.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.UserInfoEndpoint, Required = Required.Default)]
public string UserInfoEndpoint { get; set; }
/// <summary>
/// Gets the collection of 'userinfo_encryption_alg_values_supported'
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.UserInfoEncryptionAlgValuesSupported, Required = Required.Default)]
public ICollection<string> UserInfoEndpointEncryptionAlgValuesSupported { get; } = new Collection<string>();
/// <summary>
/// Gets the collection of 'userinfo_encryption_enc_values_supported'
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.UserInfoEncryptionEncValuesSupported, Required = Required.Default)]
public ICollection<string> UserInfoEndpointEncryptionEncValuesSupported { get; } = new Collection<string>();
/// <summary>
/// Gets the collection of 'userinfo_signing_alg_values_supported'
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = OpenIdProviderMetadataNames.UserInfoSigningAlgValuesSupported, Required = Required.Default)]
public ICollection<string> UserInfoEndpointSigningAlgValuesSupported { get; } = new Collection<string>();
#region shouldserialize
/// <summary>
/// Gets a bool that determines if the 'acr_values_supported' (AcrValuesSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'acr_values_supported' (AcrValuesSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeAcrValuesSupported()
{
return AcrValuesSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'claims_supported' (ClaimsSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'claims_supported' (ClaimsSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeClaimsSupported()
{
return ClaimsSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'claims_locales_supported' (ClaimsLocalesSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'claims_locales_supported' (ClaimsLocalesSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeClaimsLocalesSupported()
{
return ClaimsLocalesSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'claim_types_supported' (ClaimTypesSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'claim_types_supported' (ClaimTypesSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeClaimTypesSupported()
{
return ClaimTypesSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'display_values_supported' (DisplayValuesSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'display_values_supported' (DisplayValuesSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeDisplayValuesSupported()
{
return DisplayValuesSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'grant_types_supported' (GrantTypesSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'grant_types_supported' (GrantTypesSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeGrantTypesSupported()
{
return GrantTypesSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'id_token_encryption_alg_values_supported' (IdTokenEncryptionAlgValuesSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'id_token_encryption_alg_values_supported' (IdTokenEncryptionAlgValuesSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeIdTokenEncryptionAlgValuesSupported()
{
return IdTokenEncryptionAlgValuesSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'id_token_encryption_enc_values_supported' (IdTokenEncryptionEncValuesSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'id_token_encryption_enc_values_supported' (IdTokenEncryptionEncValuesSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeIdTokenEncryptionEncValuesSupported()
{
return IdTokenEncryptionEncValuesSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'id_token_signing_alg_values_supported' (IdTokenSigningAlgValuesSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'id_token_signing_alg_values_supported' (IdTokenSigningAlgValuesSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeIdTokenSigningAlgValuesSupported()
{
return IdTokenSigningAlgValuesSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'introspection_endpoint_auth_methods_supported' (IntrospectionEndpointAuthMethodsSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'introspection_endpoint_auth_methods_supported' (IntrospectionEndpointAuthMethodsSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeIntrospectionEndpointAuthMethodsSupported()
{
return IntrospectionEndpointAuthMethodsSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'introspection_endpoint_auth_signing_alg_values_supported' (IntrospectionEndpointAuthSigningAlgValuesSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'introspection_endpoint_auth_signing_alg_values_supported' (IntrospectionEndpointAuthSigningAlgValuesSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeIntrospectionEndpointAuthSigningAlgValuesSupported()
{
return IntrospectionEndpointAuthSigningAlgValuesSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'request_object_encryption_alg_values_supported' (RequestObjectEncryptionAlgValuesSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'request_object_encryption_alg_values_supported' (RequestObjectEncryptionAlgValuesSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeRequestObjectEncryptionAlgValuesSupported()
{
return RequestObjectEncryptionAlgValuesSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'request_object_encryption_enc_values_supported' (RequestObjectEncryptionEncValuesSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'request_object_encryption_enc_values_supported' (RequestObjectEncryptionEncValuesSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeRequestObjectEncryptionEncValuesSupported()
{
return RequestObjectEncryptionEncValuesSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'request_object_signing_alg_values_supported' (RequestObjectSigningAlgValuesSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'request_object_signing_alg_values_supported' (RequestObjectSigningAlgValuesSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeRequestObjectSigningAlgValuesSupported()
{
return RequestObjectSigningAlgValuesSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'response_modes_supported' (ResponseModesSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'response_modes_supported' (ResponseModesSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeResponseModesSupported()
{
return ResponseModesSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'response_types_supported' (ResponseTypesSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'response_types_supported' (ResponseTypesSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeResponseTypesSupported()
{
return ResponseTypesSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'SigningKeys' property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>This method always returns false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeSigningKeys()
{
return false;
}
/// <summary>
/// Gets a bool that determines if the 'scopes_supported' (ScopesSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'scopes_supported' (ScopesSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeScopesSupported()
{
return ScopesSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'subject_types_supported' (SubjectTypesSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'subject_types_supported' (SubjectTypesSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeSubjectTypesSupported()
{
return SubjectTypesSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'token_endpoint_auth_methods_supported' (TokenEndpointAuthMethodsSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'token_endpoint_auth_methods_supported' (TokenEndpointAuthMethodsSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeTokenEndpointAuthMethodsSupported()
{
return TokenEndpointAuthMethodsSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'token_endpoint_auth_signing_alg_values_supported' (TokenEndpointAuthSigningAlgValuesSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'token_endpoint_auth_signing_alg_values_supported' (TokenEndpointAuthSigningAlgValuesSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeTokenEndpointAuthSigningAlgValuesSupported()
{
return TokenEndpointAuthSigningAlgValuesSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'ui_locales_supported' (UILocalesSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'ui_locales_supported' (UILocalesSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeUILocalesSupported()
{
return UILocalesSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'userinfo_encryption_alg_values_supported' (UserInfoEndpointEncryptionAlgValuesSupported ) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'userinfo_encryption_alg_values_supported' (UserInfoEndpointEncryptionAlgValuesSupported ) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeUserInfoEndpointEncryptionAlgValuesSupported()
{
return UserInfoEndpointEncryptionAlgValuesSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'userinfo_encryption_enc_values_supported' (UserInfoEndpointEncryptionEncValuesSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'userinfo_encryption_enc_values_supported' (UserInfoEndpointEncryptionEncValuesSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeUserInfoEndpointEncryptionEncValuesSupported()
{
return UserInfoEndpointEncryptionEncValuesSupported.Count > 0;
}
/// <summary>
/// Gets a bool that determines if the 'userinfo_signing_alg_values_supported' (UserInfoEndpointSigningAlgValuesSupported) property should be serialized.
/// This is used by Json.NET in order to conditionally serialize properties.
/// </summary>
/// <return>true if 'userinfo_signing_alg_values_supported' (UserInfoEndpointSigningAlgValuesSupported) is not empty; otherwise, false.</return>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeUserInfoEndpointSigningAlgValuesSupported()
{
return UserInfoEndpointSigningAlgValuesSupported.Count > 0;
}
#endregion shouldserialize
}
}