-
Notifications
You must be signed in to change notification settings - Fork 2
/
dynamic_client_registration_response.go
1565 lines (1229 loc) · 59.7 KB
/
dynamic_client_registration_response.go
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
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"encoding/json"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// DynamicClientRegistrationResponse dynamic client registration response
//
// swagger:model DynamicClientRegistrationResponse
type DynamicClientRegistrationResponse struct {
// Application URL
AppURL string `json:"app_url,omitempty" yaml:"app_url,omitempty"`
// The client application type.
//
// Client applications can be either of a `web` or `native` types.
//
// Web applications include clients like server web applications or service apps.
//
// Native applications include single-page applications (SPAs) and mobile or desktop
// applications.
//
// Apply security measures according to the type of your application.
// Example: web
ApplicationType string `json:"application_type,omitempty" yaml:"application_type,omitempty"`
// An array of dynamically calculated application types that can be used for filtering
// Example: ["single_page","server_web","mobile_desktop","service","legacy","dcr"]
// Read Only: true
ApplicationTypes []string `json:"application_types" yaml:"application_types"`
// Identity of the intended recipients (the audience).
//
// Typically, the audience is a single resource server or a list of resource servers.
//
// It is considered a good practice to limit the audience of the token for security purposes.
Audience []string `json:"audience" yaml:"audience"`
// Authorization details types
//
// Indicates what authorization details types the client can use.
AuthorizationDetailsTypes []AuthorizationDetailType `json:"authorization_details_types" yaml:"authorization_details_types"`
// Algorithm used for encrypting authorization responses.
//
// If both signing and encryption are requested, the response is first signed, and then encrypted.
// As a result, a Nested JWT is obtained, as defined in JWT [RFC7519].
//
// If omitted, no encryption is applied by default.
// Example: RSA-OAEP-256
// Enum: [RSA-OAEP RSA-OAEP-256]
AuthorizationEncryptedResponseAlg string `json:"authorization_encrypted_response_alg,omitempty" yaml:"authorization_encrypted_response_alg,omitempty"`
// Algorithm used for encrypting authorization responses.
//
// With `authorization_encrypted_response_alg` specified, the default value is `A128CBC-HS256`.
// When `authorization_encrypted_response_enc` is included, `authorization_encrypted_response_alg`
// MUST also be provided in a request.
// Example: A128CBC-HS256
// Enum: [A256GCM A128CBC-HS256]
AuthorizationEncryptedResponseEnc string `json:"authorization_encrypted_response_enc,omitempty" yaml:"authorization_encrypted_response_enc,omitempty"`
// Algorithm used for signing authorization responses.
//
// With this parameter specified, the response is signed using JWS and according to the configured algorithm.
//
// `none` isn't allowed.
// Example: RS256
AuthorizationSignedResponseAlg string `json:"authorization_signed_response_alg,omitempty" yaml:"authorization_signed_response_alg,omitempty"`
// OPTIONAL. The JWS alg algorithm value used by the client application to sign authentication requests.
//
// When omitted, the client application doesn't send signed authentication requests.
BackchannelAuthenticationRequestSigningAlg string `json:"backchannel_authentication_request_signing_alg,omitempty" yaml:"backchannel_authentication_request_signing_alg,omitempty"`
// REQUIRED for requests when the client application uses CIBA as an authorization grant type, and the token
// delivery mode is set to `ping` or `push`.
//
// This parameter is the endpoint where an OP (OpenID Provider) posts a notification after end-user authentication.
//
// Input: an HTTPS URL.
BackchannelClientNotificationEndpoint string `json:"backchannel_client_notification_endpoint,omitempty" yaml:"backchannel_client_notification_endpoint,omitempty"`
// Boolean value specifying whether the RP requires that a sid (session ID) claim be included in the Logout Token to identify the RP session with the OP when the backchannel_logout_uri is used.
BackchannelLogoutSessionRequired bool `json:"backchannel_logout_session_required,omitempty" yaml:"backchannel_logout_session_required,omitempty"`
// RP URL that will cause the RP to log itself out when sent a Logout Token by the OP.
BackchannelLogoutURI string `json:"backchannel_logout_uri,omitempty" yaml:"backchannel_logout_uri,omitempty"`
// REQUIRED for requests when the client application uses CIBA as an authorization grant type.
//
// Input: `poll`, `ping`, or `push`.
BackchannelTokenDeliveryMode string `json:"backchannel_token_delivery_mode,omitempty" yaml:"backchannel_token_delivery_mode,omitempty"`
// OPTIONAL. A boolean value indicating the `user_code` parameter support by the client application.
//
// If omitted, the default value is `false`.
//
// This applies only when the `backchannel_user_code_parameter_supported` OP parameter is `true`.
BackchannelUserCodeParameter bool `json:"backchannel_user_code_parameter,omitempty" yaml:"backchannel_user_code_parameter,omitempty"`
// OAuth client application identifier
//
// If not provided, a random client ID is generated.
ClientID string `json:"client_id,omitempty" yaml:"client_id,omitempty"`
// The client identifier time of issue.
//
// The value is the number of seconds between 1970-01-01T00:00:00Z (UTC) and the date/time of issue.
ClientIDIssuedAt int64 `json:"client_id_issued_at,omitempty" yaml:"client_id_issued_at,omitempty"`
// Human-readable name of a client application.
// Example: My app
ClientName string `json:"client_name,omitempty" yaml:"client_name,omitempty"`
// OAuth client secret
//
// If not provided, a random client secret is generated.
// Min Length: 32
ClientSecret string `json:"client_secret,omitempty" yaml:"client_secret,omitempty"`
// The client secret expiration time.
//
// If the client secret does not expire, `client_secret_expires_at` = `0`.
ClientSecretExpiresAt int64 `json:"client_secret_expires_at,omitempty" yaml:"client_secret_expires_at,omitempty"`
// URI of a client application.
ClientURI string `json:"client_uri,omitempty" yaml:"client_uri,omitempty"`
// Date when the client application was created.
// Example: 2022-04-07T19:17:31.323187Z
// Format: date-time
CreatedAt strfmt.DateTime `json:"created_at,omitempty" yaml:"created_at,omitempty"`
// Description of the client application.
Description string `json:"description,omitempty" yaml:"description,omitempty"`
// Boolean value specifying whether the client always uses DPoP for token requests
// If true, the authorization server will reject token requests from this client that do not contain the DPoP header.
DpopBoundAccessTokens bool `json:"dpop_bound_access_tokens,omitempty" yaml:"dpop_bound_access_tokens,omitempty"`
// dynamically registered
DynamicallyRegistered bool `json:"dynamically_registered,omitempty" yaml:"dynamically_registered,omitempty"`
// An array of allowed OAuth client grant types.
//
// The `grantTypes` array stores OAuth flows that are allowed for a given client application.
//
// [Read more](https://cloudentity.com/developers/basics/oauth-grant-types/grant-types-overview/) about grant types.
// Example: ["password","refresh_token","client_credentials","implicit","authorization_code"]
GrantTypes []string `json:"grant_types" yaml:"grant_types"`
// An array of hashed rotated client secrets
HashedRotatedSecrets []string `json:"hashed_rotated_secrets" yaml:"hashed_rotated_secrets"`
// Hashed client secret
//
// Hashing client secrets provides additional security for your secrets storage as it hides
// plaintext secrets from being viewed both in the UI and the database.
HashedSecret string `json:"hashed_secret,omitempty" yaml:"hashed_secret,omitempty"`
// JWE alg algorithm for encrypting the ID token issued to this client application.
// Enum: [RSA-OAEP RSA-OAEP-256]
IDTokenEncryptedResponseAlg string `json:"id_token_encrypted_response_alg,omitempty" yaml:"id_token_encrypted_response_alg,omitempty"`
// JWE enc algorithm for encrypting the ID token issued to this client application.
// Enum: [A256GCM A128CBC-HS256]
IDTokenEncryptedResponseEnc string `json:"id_token_encrypted_response_enc,omitempty" yaml:"id_token_encrypted_response_enc,omitempty"`
// Algorithm for signing ID tokens issued for a client application.
//
// The default value depends on authorization server configuration.
// Example: ES256
// Enum: [RS256 ES256 PS256]
IDTokenSignedResponseAlg string `json:"id_token_signed_response_alg,omitempty" yaml:"id_token_signed_response_alg,omitempty"`
// An introspection endpoint authentication method configured for the client application (read-only).
//
// If empty, the `token_endpoint_auth_method` is used.
//
// Cloudentity supports the following client authentication methods:
// `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`,
// `self_signed_tls_client_auth`, `tls_client_auth`, `none`.
//
// [Read more](https://cloudentity.com/developers/basics/oauth-client-authentication/client-authentication-overview/) about client authentication.
// Example: client_secret_basic
// Enum: [client_secret_basic client_secret_post client_secret_jwt private_key_jwt self_signed_tls_client_auth tls_client_auth none]
IntrospectionEndpointAuthMethod string `json:"introspection_endpoint_auth_method,omitempty" yaml:"introspection_endpoint_auth_method,omitempty"`
// jwks
Jwks *ClientJWKs `json:"jwks,omitempty" yaml:"jwks,omitempty"`
// A URL of JSON Web Key Set with the public keys used by a client application to authenticate to Cloudentity.
JwksURI string `json:"jwks_uri,omitempty" yaml:"jwks_uri,omitempty"`
// Logo URI.
LogoURI string `json:"logo_uri,omitempty" yaml:"logo_uri,omitempty"`
// External organization identifier. It is a unique string assigned by the CDR Register to identify an Accredited
// Data Recipient Brand.
//
// The value obtained is used as the `aud` claim for message signing, for example, when a JSON Web Token (JWT) is
// required for authorization, and represents the audience(s) the JWT is intended for.
// Example: 5647fe90-f6bc-11eb-9a03-0242ac130003
OrganisationID string `json:"organisation_id,omitempty" yaml:"organisation_id,omitempty"`
// Policy URL to read about how the profile data is used.
PolicyURI string `json:"policy_uri,omitempty" yaml:"policy_uri,omitempty"`
// Array of URLs to which a relying party may request that the user be redirected after a logout has been performed.
PostLogoutRedirectUris []string `json:"post_logout_redirect_uris" yaml:"post_logout_redirect_uris"`
// privacy
Privacy *ClientPrivacy `json:"privacy,omitempty" yaml:"privacy,omitempty"`
// redirect uris
RedirectUris RedirectURIs `json:"redirect_uris,omitempty" yaml:"redirect_uris,omitempty"`
// Registration token that can be used for client management
RegistrationAccessToken string `json:"registration_access_token,omitempty" yaml:"registration_access_token,omitempty"`
// Registration token expiration time in seconds. If 0 value is returned, token never expires.
RegistrationAccessTokenExpiresIn int64 `json:"registration_access_token_expires_in,omitempty" yaml:"registration_access_token_expires_in,omitempty"`
// URL for client management
RegistrationClientURI string `json:"registration_client_uri,omitempty" yaml:"registration_client_uri,omitempty"`
// Optional JWE alg algorithm the client is declaring that it may use for encrypting Request Objects
// Example: RSA-OAEP
// Enum: [RSA-OAEP RSA-OAEP-256]
RequestObjectEncryptionAlg string `json:"request_object_encryption_alg,omitempty" yaml:"request_object_encryption_alg,omitempty"`
// Optional JWE enc algorithm the client is declaring that it may use for encrypting Request Objects
// When `request_object_encryption_enc` is included, `request_object_encryption_alg` MUST also be provided.
// Example: A256GCM
// Enum: [A256GCM A128CBC-HS256]
RequestObjectEncryptionEnc string `json:"request_object_encryption_enc,omitempty" yaml:"request_object_encryption_enc,omitempty"`
// Request object signing algorithm for the token endpoint
//
// Cloudentity supports signing tokens with the RS256, ES256, and PS256 algorithms. If you do not want
// to use a signing algorithm, set the value of this parameter to `none`.
// Example: none
// Enum: [any none RS256 ES256 PS256]
RequestObjectSigningAlg string `json:"request_object_signing_alg,omitempty" yaml:"request_object_signing_alg,omitempty"`
// Array of absolute URIs that points to the Request Object that holds authorization request parameters.
RequestUris []string `json:"request_uris" yaml:"request_uris"`
// Boolean parameter indicating whether the only means of initiating an authorization request the client is allowed to use is PAR.
RequirePushedAuthorizationRequests bool `json:"require_pushed_authorization_requests,omitempty" yaml:"require_pushed_authorization_requests,omitempty"`
// response types
ResponseTypes ResponseTypes `json:"response_types,omitempty" yaml:"response_types,omitempty"`
// A revocation endpoint authentication method configured for the client application (read-only).
// If empty, the `token_endpoint_auth_method` is used.
//
// Cloudentity supports the following client authentication methods:
// `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`,
// `self_signed_tls_client_auth`, `tls_client_auth`, `none`.
//
// [Read more](https://cloudentity.com/developers/basics/oauth-client-authentication/client-authentication-overview/) about client authentication.
// Example: client_secret_basic
// Enum: [client_secret_basic client_secret_post client_secret_jwt private_key_jwt self_signed_tls_client_auth tls_client_auth none]
RevocationEndpointAuthMethod string `json:"revocation_endpoint_auth_method,omitempty" yaml:"revocation_endpoint_auth_method,omitempty"`
// An array of rotated OAuth client secrets
RotatedSecrets []string `json:"rotated_secrets" yaml:"rotated_secrets"`
// Space-separated list of scopes for compatibility with the OAuth specification.
// Example: email offline_access openid
Scope string `json:"scope,omitempty" yaml:"scope,omitempty"`
// An array of string represented scopes assigned to a client application
// Example: ["email","offline_access","openid"]
Scopes []string `json:"scopes" yaml:"scopes"`
// OPTIONAL. [A URL using the HTTPS scheme](https://openid.net/specs/openid-connect-registration-1_0.html#SectorIdentifierValidation).
// It must reference a JSON file with the array of `redirect_uri` values.
//
// Pass this parameter when you use multiple domains in your `redirect_uris` or need a mechanism to allow changes in
// domain without affecting consumer consent.
//
// [Read more](https://openid.net/specs/openid-connect-core-1_0.html)
SectorIdentifierURI string `json:"sector_identifier_uri,omitempty" yaml:"sector_identifier_uri,omitempty"`
// A unique identifier string (e.g., a Universally Unique Identifier
// (UUID)) assigned by the client developer or software publisher.
//
// The `software_id` MUST remain the same across
// multiple updates or versions of the same software package. The
// value of this field is not intended to be human-readable and is
// usually opaque to the client and authorization server.
SoftwareID string `json:"software_id,omitempty" yaml:"software_id,omitempty"`
// software statement
SoftwareStatement string `json:"software_statement,omitempty" yaml:"software_statement,omitempty"`
// A version identifier string for the client software identified by
// `software_id`. The value of the `software_version` MUST be changed
// with any update of the client software identified by the same
// `software_id`.
SoftwareVersion string `json:"software_version,omitempty" yaml:"software_version,omitempty"`
// Subject identifier type
//
// Stores information if the subject identifier is of the `public` or the `pairwise` type.
//
// Subject identifiers identify an end-user. They are locally unique and never reassigned within the Issuer,
// and are intended to be consumed by client applications. There are two types
// of subject identifiers: `public` and `pairwise`.
//
// For the `public` type, the value of the `sub` (subject) token claim is the same for all clients.
//
// For the `pairwise` type, a different `sub` (subject) token claim is provided for each client.
// Using the `pairwise` subject identifier makes it impossible for client applications to correlate the end-user's
// activity without their permission.
// Example: public
// Enum: [public pairwise]
SubjectType string `json:"subject_type,omitempty" yaml:"subject_type,omitempty"`
// A string containing the value of an expected dNSName SAN entry in the certificate.
TLSClientAuthSanDNS string `json:"tls_client_auth_san_dns,omitempty" yaml:"tls_client_auth_san_dns,omitempty"`
// A string containing the value of an expected rfc822Name SAN entry in the certificate.
TLSClientAuthSanEmail string `json:"tls_client_auth_san_email,omitempty" yaml:"tls_client_auth_san_email,omitempty"`
// A string representation of an IP address in either dotted decimal notation (for IPv4) or colon-delimited hexadecimal (for IPv6, as defined in [RFC5952]) that is expected to be present as an iPAddress SAN entry in the certificate.
TLSClientAuthSanIP string `json:"tls_client_auth_san_ip,omitempty" yaml:"tls_client_auth_san_ip,omitempty"`
// A string containing the value of an expected uniformResourceIdentifier SAN entry in the certificate.
TLSClientAuthSanURI string `json:"tls_client_auth_san_uri,omitempty" yaml:"tls_client_auth_san_uri,omitempty"`
// An [RFC4514] string representation of the expected subject distinguished name of the certificate.
TLSClientAuthSubjectDn string `json:"tls_client_auth_subject_dn,omitempty" yaml:"tls_client_auth_subject_dn,omitempty"`
// Boolean value indicating server support for mutual TLS client certificate-bound access tokens. If omitted, the default value is "false".
TLSClientCertificateBoundAccessTokens bool `json:"tls_client_certificate_bound_access_tokens,omitempty" yaml:"tls_client_certificate_bound_access_tokens,omitempty"`
// Token endpoint authentication method configured for a client application
//
// Cloudentity supports the following client authentication methods:
// `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`,
// `self_signed_tls_client_auth`, `tls_client_auth`, `none`.
//
// To learn more, go to the Authorization Basics > Client Authentication section of this guide.
// Example: client_secret_basic
// Enum: [client_secret_basic client_secret_post client_secret_jwt private_key_jwt self_signed_tls_client_auth tls_client_auth none]
TokenEndpointAuthMethod string `json:"token_endpoint_auth_method,omitempty" yaml:"token_endpoint_auth_method,omitempty"`
// Signing algorithm for the token endpoint
//
// This field is optional. If empty, a client can use any algorithm supported by the server (see `token_endpoint_auth_signing_alg_values_supported` in the well-known endpoing).
//
// If provided, depending on the server configuration, client can use of one: HS256, RS256, ES256, PS256 algorithms.
//
// If your token endpoint authentication is set to the `private_key_jwt` method, the
// `token_endpoint_auth_signing_alg` parameter must be either RS256, ES256, or PS256.
//
// If your token endpoint authentication is set to the `client_secret_jwt` method,
// the `token_endpoint_auth_signing_alg` parameter must be HS256.
// Example: ES256
// Enum: [RS256 ES256 PS256 HS256 ]
TokenEndpointAuthSigningAlg string `json:"token_endpoint_auth_signing_alg,omitempty" yaml:"token_endpoint_auth_signing_alg,omitempty"`
// token exchange
TokenExchange *ClientTokenExchangeConfiguration `json:"token_exchange,omitempty" yaml:"token_exchange,omitempty"`
// Terms of Service URL.
TosURI string `json:"tos_uri,omitempty" yaml:"tos_uri,omitempty"`
// Date when the client application was updated.
// Example: 2022-05-08T01:11:51.1262916Z
// Format: date-time
UpdatedAt strfmt.DateTime `json:"updated_at,omitempty" yaml:"updated_at,omitempty"`
// JWS alg algorithm REQUIRED for signing UserInfo Responses.
//
// If specified, the response is a JWT serialized and signed with JWS.
//
// If omitted, then by default, UserInfo Response returns the Claims
// as an UTF-8 encoded JSON object using the application/json content-type.
// Example: none
// Enum: [none RS256 ES256]
UserinfoSignedResponseAlg string `json:"userinfo_signed_response_alg,omitempty" yaml:"userinfo_signed_response_alg,omitempty"`
}
// Validate validates this dynamic client registration response
func (m *DynamicClientRegistrationResponse) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateApplicationTypes(formats); err != nil {
res = append(res, err)
}
if err := m.validateAuthorizationDetailsTypes(formats); err != nil {
res = append(res, err)
}
if err := m.validateAuthorizationEncryptedResponseAlg(formats); err != nil {
res = append(res, err)
}
if err := m.validateAuthorizationEncryptedResponseEnc(formats); err != nil {
res = append(res, err)
}
if err := m.validateClientSecret(formats); err != nil {
res = append(res, err)
}
if err := m.validateCreatedAt(formats); err != nil {
res = append(res, err)
}
if err := m.validateGrantTypes(formats); err != nil {
res = append(res, err)
}
if err := m.validateIDTokenEncryptedResponseAlg(formats); err != nil {
res = append(res, err)
}
if err := m.validateIDTokenEncryptedResponseEnc(formats); err != nil {
res = append(res, err)
}
if err := m.validateIDTokenSignedResponseAlg(formats); err != nil {
res = append(res, err)
}
if err := m.validateIntrospectionEndpointAuthMethod(formats); err != nil {
res = append(res, err)
}
if err := m.validateJwks(formats); err != nil {
res = append(res, err)
}
if err := m.validatePrivacy(formats); err != nil {
res = append(res, err)
}
if err := m.validateRedirectUris(formats); err != nil {
res = append(res, err)
}
if err := m.validateRequestObjectEncryptionAlg(formats); err != nil {
res = append(res, err)
}
if err := m.validateRequestObjectEncryptionEnc(formats); err != nil {
res = append(res, err)
}
if err := m.validateRequestObjectSigningAlg(formats); err != nil {
res = append(res, err)
}
if err := m.validateResponseTypes(formats); err != nil {
res = append(res, err)
}
if err := m.validateRevocationEndpointAuthMethod(formats); err != nil {
res = append(res, err)
}
if err := m.validateSubjectType(formats); err != nil {
res = append(res, err)
}
if err := m.validateTokenEndpointAuthMethod(formats); err != nil {
res = append(res, err)
}
if err := m.validateTokenEndpointAuthSigningAlg(formats); err != nil {
res = append(res, err)
}
if err := m.validateTokenExchange(formats); err != nil {
res = append(res, err)
}
if err := m.validateUpdatedAt(formats); err != nil {
res = append(res, err)
}
if err := m.validateUserinfoSignedResponseAlg(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
var dynamicClientRegistrationResponseApplicationTypesItemsEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["single_page","server_web","mobile_desktop","service","legacy","dcr"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
dynamicClientRegistrationResponseApplicationTypesItemsEnum = append(dynamicClientRegistrationResponseApplicationTypesItemsEnum, v)
}
}
func (m *DynamicClientRegistrationResponse) validateApplicationTypesItemsEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, dynamicClientRegistrationResponseApplicationTypesItemsEnum, true); err != nil {
return err
}
return nil
}
func (m *DynamicClientRegistrationResponse) validateApplicationTypes(formats strfmt.Registry) error {
if swag.IsZero(m.ApplicationTypes) { // not required
return nil
}
for i := 0; i < len(m.ApplicationTypes); i++ {
// value enum
if err := m.validateApplicationTypesItemsEnum("application_types"+"."+strconv.Itoa(i), "body", m.ApplicationTypes[i]); err != nil {
return err
}
}
return nil
}
func (m *DynamicClientRegistrationResponse) validateAuthorizationDetailsTypes(formats strfmt.Registry) error {
if swag.IsZero(m.AuthorizationDetailsTypes) { // not required
return nil
}
for i := 0; i < len(m.AuthorizationDetailsTypes); i++ {
if err := m.AuthorizationDetailsTypes[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("authorization_details_types" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("authorization_details_types" + "." + strconv.Itoa(i))
}
return err
}
}
return nil
}
var dynamicClientRegistrationResponseTypeAuthorizationEncryptedResponseAlgPropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["RSA-OAEP","RSA-OAEP-256"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
dynamicClientRegistrationResponseTypeAuthorizationEncryptedResponseAlgPropEnum = append(dynamicClientRegistrationResponseTypeAuthorizationEncryptedResponseAlgPropEnum, v)
}
}
const (
// DynamicClientRegistrationResponseAuthorizationEncryptedResponseAlgRSADashOAEP captures enum value "RSA-OAEP"
DynamicClientRegistrationResponseAuthorizationEncryptedResponseAlgRSADashOAEP string = "RSA-OAEP"
// DynamicClientRegistrationResponseAuthorizationEncryptedResponseAlgRSADashOAEPDash256 captures enum value "RSA-OAEP-256"
DynamicClientRegistrationResponseAuthorizationEncryptedResponseAlgRSADashOAEPDash256 string = "RSA-OAEP-256"
)
// prop value enum
func (m *DynamicClientRegistrationResponse) validateAuthorizationEncryptedResponseAlgEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, dynamicClientRegistrationResponseTypeAuthorizationEncryptedResponseAlgPropEnum, true); err != nil {
return err
}
return nil
}
func (m *DynamicClientRegistrationResponse) validateAuthorizationEncryptedResponseAlg(formats strfmt.Registry) error {
if swag.IsZero(m.AuthorizationEncryptedResponseAlg) { // not required
return nil
}
// value enum
if err := m.validateAuthorizationEncryptedResponseAlgEnum("authorization_encrypted_response_alg", "body", m.AuthorizationEncryptedResponseAlg); err != nil {
return err
}
return nil
}
var dynamicClientRegistrationResponseTypeAuthorizationEncryptedResponseEncPropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["A256GCM","A128CBC-HS256"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
dynamicClientRegistrationResponseTypeAuthorizationEncryptedResponseEncPropEnum = append(dynamicClientRegistrationResponseTypeAuthorizationEncryptedResponseEncPropEnum, v)
}
}
const (
// DynamicClientRegistrationResponseAuthorizationEncryptedResponseEncA256GCM captures enum value "A256GCM"
DynamicClientRegistrationResponseAuthorizationEncryptedResponseEncA256GCM string = "A256GCM"
// DynamicClientRegistrationResponseAuthorizationEncryptedResponseEncA128CBCDashHS256 captures enum value "A128CBC-HS256"
DynamicClientRegistrationResponseAuthorizationEncryptedResponseEncA128CBCDashHS256 string = "A128CBC-HS256"
)
// prop value enum
func (m *DynamicClientRegistrationResponse) validateAuthorizationEncryptedResponseEncEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, dynamicClientRegistrationResponseTypeAuthorizationEncryptedResponseEncPropEnum, true); err != nil {
return err
}
return nil
}
func (m *DynamicClientRegistrationResponse) validateAuthorizationEncryptedResponseEnc(formats strfmt.Registry) error {
if swag.IsZero(m.AuthorizationEncryptedResponseEnc) { // not required
return nil
}
// value enum
if err := m.validateAuthorizationEncryptedResponseEncEnum("authorization_encrypted_response_enc", "body", m.AuthorizationEncryptedResponseEnc); err != nil {
return err
}
return nil
}
func (m *DynamicClientRegistrationResponse) validateClientSecret(formats strfmt.Registry) error {
if swag.IsZero(m.ClientSecret) { // not required
return nil
}
if err := validate.MinLength("client_secret", "body", m.ClientSecret, 32); err != nil {
return err
}
return nil
}
func (m *DynamicClientRegistrationResponse) validateCreatedAt(formats strfmt.Registry) error {
if swag.IsZero(m.CreatedAt) { // not required
return nil
}
if err := validate.FormatOf("created_at", "body", "date-time", m.CreatedAt.String(), formats); err != nil {
return err
}
return nil
}
var dynamicClientRegistrationResponseGrantTypesItemsEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["authorization_code","implicit","client_credentials","refresh_token","password","urn:ietf:params:oauth:grant-type:jwt-bearer","urn:openid:params:grant-type:ciba","urn:ietf:params:oauth:grant-type:token-exchange","urn:ietf:params:oauth:grant-type:device_code"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
dynamicClientRegistrationResponseGrantTypesItemsEnum = append(dynamicClientRegistrationResponseGrantTypesItemsEnum, v)
}
}
func (m *DynamicClientRegistrationResponse) validateGrantTypesItemsEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, dynamicClientRegistrationResponseGrantTypesItemsEnum, true); err != nil {
return err
}
return nil
}
func (m *DynamicClientRegistrationResponse) validateGrantTypes(formats strfmt.Registry) error {
if swag.IsZero(m.GrantTypes) { // not required
return nil
}
for i := 0; i < len(m.GrantTypes); i++ {
// value enum
if err := m.validateGrantTypesItemsEnum("grant_types"+"."+strconv.Itoa(i), "body", m.GrantTypes[i]); err != nil {
return err
}
}
return nil
}
var dynamicClientRegistrationResponseTypeIDTokenEncryptedResponseAlgPropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["RSA-OAEP","RSA-OAEP-256"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
dynamicClientRegistrationResponseTypeIDTokenEncryptedResponseAlgPropEnum = append(dynamicClientRegistrationResponseTypeIDTokenEncryptedResponseAlgPropEnum, v)
}
}
const (
// DynamicClientRegistrationResponseIDTokenEncryptedResponseAlgRSADashOAEP captures enum value "RSA-OAEP"
DynamicClientRegistrationResponseIDTokenEncryptedResponseAlgRSADashOAEP string = "RSA-OAEP"
// DynamicClientRegistrationResponseIDTokenEncryptedResponseAlgRSADashOAEPDash256 captures enum value "RSA-OAEP-256"
DynamicClientRegistrationResponseIDTokenEncryptedResponseAlgRSADashOAEPDash256 string = "RSA-OAEP-256"
)
// prop value enum
func (m *DynamicClientRegistrationResponse) validateIDTokenEncryptedResponseAlgEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, dynamicClientRegistrationResponseTypeIDTokenEncryptedResponseAlgPropEnum, true); err != nil {
return err
}
return nil
}
func (m *DynamicClientRegistrationResponse) validateIDTokenEncryptedResponseAlg(formats strfmt.Registry) error {
if swag.IsZero(m.IDTokenEncryptedResponseAlg) { // not required
return nil
}
// value enum
if err := m.validateIDTokenEncryptedResponseAlgEnum("id_token_encrypted_response_alg", "body", m.IDTokenEncryptedResponseAlg); err != nil {
return err
}
return nil
}
var dynamicClientRegistrationResponseTypeIDTokenEncryptedResponseEncPropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["A256GCM","A128CBC-HS256"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
dynamicClientRegistrationResponseTypeIDTokenEncryptedResponseEncPropEnum = append(dynamicClientRegistrationResponseTypeIDTokenEncryptedResponseEncPropEnum, v)
}
}
const (
// DynamicClientRegistrationResponseIDTokenEncryptedResponseEncA256GCM captures enum value "A256GCM"
DynamicClientRegistrationResponseIDTokenEncryptedResponseEncA256GCM string = "A256GCM"
// DynamicClientRegistrationResponseIDTokenEncryptedResponseEncA128CBCDashHS256 captures enum value "A128CBC-HS256"
DynamicClientRegistrationResponseIDTokenEncryptedResponseEncA128CBCDashHS256 string = "A128CBC-HS256"
)
// prop value enum
func (m *DynamicClientRegistrationResponse) validateIDTokenEncryptedResponseEncEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, dynamicClientRegistrationResponseTypeIDTokenEncryptedResponseEncPropEnum, true); err != nil {
return err
}
return nil
}
func (m *DynamicClientRegistrationResponse) validateIDTokenEncryptedResponseEnc(formats strfmt.Registry) error {
if swag.IsZero(m.IDTokenEncryptedResponseEnc) { // not required
return nil
}
// value enum
if err := m.validateIDTokenEncryptedResponseEncEnum("id_token_encrypted_response_enc", "body", m.IDTokenEncryptedResponseEnc); err != nil {
return err
}
return nil
}
var dynamicClientRegistrationResponseTypeIDTokenSignedResponseAlgPropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["RS256","ES256","PS256"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
dynamicClientRegistrationResponseTypeIDTokenSignedResponseAlgPropEnum = append(dynamicClientRegistrationResponseTypeIDTokenSignedResponseAlgPropEnum, v)
}
}
const (
// DynamicClientRegistrationResponseIDTokenSignedResponseAlgRS256 captures enum value "RS256"
DynamicClientRegistrationResponseIDTokenSignedResponseAlgRS256 string = "RS256"
// DynamicClientRegistrationResponseIDTokenSignedResponseAlgES256 captures enum value "ES256"
DynamicClientRegistrationResponseIDTokenSignedResponseAlgES256 string = "ES256"
// DynamicClientRegistrationResponseIDTokenSignedResponseAlgPS256 captures enum value "PS256"
DynamicClientRegistrationResponseIDTokenSignedResponseAlgPS256 string = "PS256"
)
// prop value enum
func (m *DynamicClientRegistrationResponse) validateIDTokenSignedResponseAlgEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, dynamicClientRegistrationResponseTypeIDTokenSignedResponseAlgPropEnum, true); err != nil {
return err
}
return nil
}
func (m *DynamicClientRegistrationResponse) validateIDTokenSignedResponseAlg(formats strfmt.Registry) error {
if swag.IsZero(m.IDTokenSignedResponseAlg) { // not required
return nil
}
// value enum
if err := m.validateIDTokenSignedResponseAlgEnum("id_token_signed_response_alg", "body", m.IDTokenSignedResponseAlg); err != nil {
return err
}
return nil
}
var dynamicClientRegistrationResponseTypeIntrospectionEndpointAuthMethodPropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["client_secret_basic","client_secret_post","client_secret_jwt","private_key_jwt","self_signed_tls_client_auth","tls_client_auth","none"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
dynamicClientRegistrationResponseTypeIntrospectionEndpointAuthMethodPropEnum = append(dynamicClientRegistrationResponseTypeIntrospectionEndpointAuthMethodPropEnum, v)
}
}
const (
// DynamicClientRegistrationResponseIntrospectionEndpointAuthMethodClientSecretBasic captures enum value "client_secret_basic"
DynamicClientRegistrationResponseIntrospectionEndpointAuthMethodClientSecretBasic string = "client_secret_basic"
// DynamicClientRegistrationResponseIntrospectionEndpointAuthMethodClientSecretPost captures enum value "client_secret_post"
DynamicClientRegistrationResponseIntrospectionEndpointAuthMethodClientSecretPost string = "client_secret_post"
// DynamicClientRegistrationResponseIntrospectionEndpointAuthMethodClientSecretJwt captures enum value "client_secret_jwt"
DynamicClientRegistrationResponseIntrospectionEndpointAuthMethodClientSecretJwt string = "client_secret_jwt"
// DynamicClientRegistrationResponseIntrospectionEndpointAuthMethodPrivateKeyJwt captures enum value "private_key_jwt"
DynamicClientRegistrationResponseIntrospectionEndpointAuthMethodPrivateKeyJwt string = "private_key_jwt"
// DynamicClientRegistrationResponseIntrospectionEndpointAuthMethodSelfSignedTLSClientAuth captures enum value "self_signed_tls_client_auth"
DynamicClientRegistrationResponseIntrospectionEndpointAuthMethodSelfSignedTLSClientAuth string = "self_signed_tls_client_auth"
// DynamicClientRegistrationResponseIntrospectionEndpointAuthMethodTLSClientAuth captures enum value "tls_client_auth"
DynamicClientRegistrationResponseIntrospectionEndpointAuthMethodTLSClientAuth string = "tls_client_auth"
// DynamicClientRegistrationResponseIntrospectionEndpointAuthMethodNone captures enum value "none"
DynamicClientRegistrationResponseIntrospectionEndpointAuthMethodNone string = "none"
)
// prop value enum
func (m *DynamicClientRegistrationResponse) validateIntrospectionEndpointAuthMethodEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, dynamicClientRegistrationResponseTypeIntrospectionEndpointAuthMethodPropEnum, true); err != nil {
return err
}
return nil
}
func (m *DynamicClientRegistrationResponse) validateIntrospectionEndpointAuthMethod(formats strfmt.Registry) error {
if swag.IsZero(m.IntrospectionEndpointAuthMethod) { // not required
return nil
}
// value enum
if err := m.validateIntrospectionEndpointAuthMethodEnum("introspection_endpoint_auth_method", "body", m.IntrospectionEndpointAuthMethod); err != nil {
return err
}
return nil
}
func (m *DynamicClientRegistrationResponse) validateJwks(formats strfmt.Registry) error {
if swag.IsZero(m.Jwks) { // not required
return nil
}
if m.Jwks != nil {
if err := m.Jwks.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("jwks")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("jwks")
}
return err
}
}
return nil
}
func (m *DynamicClientRegistrationResponse) validatePrivacy(formats strfmt.Registry) error {
if swag.IsZero(m.Privacy) { // not required
return nil
}
if m.Privacy != nil {
if err := m.Privacy.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("privacy")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("privacy")
}
return err
}
}
return nil
}
func (m *DynamicClientRegistrationResponse) validateRedirectUris(formats strfmt.Registry) error {
if swag.IsZero(m.RedirectUris) { // not required
return nil
}
if err := m.RedirectUris.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("redirect_uris")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("redirect_uris")
}
return err
}
return nil
}
var dynamicClientRegistrationResponseTypeRequestObjectEncryptionAlgPropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["RSA-OAEP","RSA-OAEP-256"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
dynamicClientRegistrationResponseTypeRequestObjectEncryptionAlgPropEnum = append(dynamicClientRegistrationResponseTypeRequestObjectEncryptionAlgPropEnum, v)
}
}
const (
// DynamicClientRegistrationResponseRequestObjectEncryptionAlgRSADashOAEP captures enum value "RSA-OAEP"
DynamicClientRegistrationResponseRequestObjectEncryptionAlgRSADashOAEP string = "RSA-OAEP"
// DynamicClientRegistrationResponseRequestObjectEncryptionAlgRSADashOAEPDash256 captures enum value "RSA-OAEP-256"
DynamicClientRegistrationResponseRequestObjectEncryptionAlgRSADashOAEPDash256 string = "RSA-OAEP-256"
)
// prop value enum
func (m *DynamicClientRegistrationResponse) validateRequestObjectEncryptionAlgEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, dynamicClientRegistrationResponseTypeRequestObjectEncryptionAlgPropEnum, true); err != nil {
return err
}
return nil
}
func (m *DynamicClientRegistrationResponse) validateRequestObjectEncryptionAlg(formats strfmt.Registry) error {
if swag.IsZero(m.RequestObjectEncryptionAlg) { // not required
return nil
}
// value enum
if err := m.validateRequestObjectEncryptionAlgEnum("request_object_encryption_alg", "body", m.RequestObjectEncryptionAlg); err != nil {
return err
}
return nil
}
var dynamicClientRegistrationResponseTypeRequestObjectEncryptionEncPropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["A256GCM","A128CBC-HS256"]`), &res); err != nil {