Skip to content

Commit c4f3ade

Browse files
committed
fix(client): add omitempty to additional optional DCR fields
Add omitempty JSON tag to client_name, owner, subject_type, and scope fields to ensure they are omitted from JSON output when empty, per RFC 7591 requirements for optional DCR fields. Fixes #4044
1 parent a848a71 commit c4f3ade

File tree

76 files changed

+70
-241
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+70
-241
lines changed

client/.snapshots/TestHandler-common-case=create_clients-case=0-description=basic_dynamic_client_registration.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
{
2-
"client_name": "",
32
"redirect_uris": [
43
"http://localhost:3000/cb"
54
],
65
"grant_types": null,
76
"response_types": null,
87
"scope": "offline_access offline openid",
98
"audience": [],
10-
"owner": "",
119
"allowed_cors_origins": [],
1210
"client_secret_expires_at": 0,
1311
"subject_type": "public",

client/.snapshots/TestHandler-common-case=create_clients-case=1-description=basic_admin_registration.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"client_name": "",
32
"client_secret": "averylongsecret",
43
"redirect_uris": [
54
"http://localhost:3000/cb"
@@ -8,7 +7,6 @@
87
"response_types": null,
98
"scope": "offline_access offline openid",
109
"audience": [],
11-
"owner": "",
1210
"allowed_cors_origins": [],
1311
"client_secret_expires_at": 0,
1412
"subject_type": "public",

client/.snapshots/TestHandler-common-case=create_clients-case=10-description=setting_skip_logout_consent_succeeds_for_admin_registration.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"client_name": "",
32
"client_secret": "2SKZkBf2P5g4toAXXnCrr~_sDM",
43
"redirect_uris": [
54
"http://localhost:3000/cb"
@@ -8,7 +7,6 @@
87
"response_types": null,
98
"scope": "offline_access offline openid",
109
"audience": [],
11-
"owner": "",
1210
"allowed_cors_origins": [],
1311
"client_secret_expires_at": 0,
1412
"subject_type": "public",

client/.snapshots/TestHandler-common-case=create_clients-case=12-description=empty_ID_succeeds.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"client_name": "",
32
"client_secret": "averylongsecret",
43
"redirect_uris": [
54
"http://localhost:3000/cb"
@@ -8,7 +7,6 @@
87
"response_types": null,
98
"scope": "offline_access offline openid",
109
"audience": [],
11-
"owner": "",
1210
"allowed_cors_origins": [],
1311
"client_secret_expires_at": 0,
1412
"subject_type": "public",

client/.snapshots/TestHandler-common-case=create_clients-case=4-description=non-uuid_works.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"client_id": "not-a-uuid",
3-
"client_name": "",
43
"client_secret": "averylongsecret",
54
"redirect_uris": [
65
"http://localhost:3000/cb"
@@ -9,7 +8,6 @@
98
"response_types": null,
109
"scope": "offline_access offline openid",
1110
"audience": [],
12-
"owner": "",
1311
"allowed_cors_origins": [],
1412
"client_secret_expires_at": 0,
1513
"subject_type": "public",

client/.snapshots/TestHandler-common-case=create_clients-case=5-description=setting_client_id_as_uuid_works.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"client_id": "98941dac-f963-4468-8a23-9483b1e04e3c",
3-
"client_name": "",
43
"client_secret": "not too short",
54
"redirect_uris": [
65
"http://localhost:3000/cb"
@@ -9,7 +8,6 @@
98
"response_types": null,
109
"scope": "offline_access offline openid",
1110
"audience": [],
12-
"owner": "",
1311
"allowed_cors_origins": [],
1412
"client_secret_expires_at": 0,
1513
"subject_type": "public",

client/.snapshots/TestHandler-common-case=create_clients-case=8-description=setting_skip_consent_succeeds_for_admin_registration.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"client_name": "",
32
"client_secret": "2SKZkBf2P5g4toAXXnCrr~_sDM",
43
"redirect_uris": [
54
"http://localhost:3000/cb"
@@ -8,7 +7,6 @@
87
"response_types": null,
98
"scope": "offline_access offline openid",
109
"audience": [],
11-
"owner": "",
1210
"allowed_cors_origins": [],
1311
"client_secret_expires_at": 0,
1412
"subject_type": "public",

client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=admin.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
{
22
"body": {
3-
"client_name": "",
43
"redirect_uris": [
54
"http://localhost:3000/cb"
65
],
76
"grant_types": [],
87
"response_types": [],
98
"scope": "offline_access offline openid",
109
"audience": [],
11-
"owner": "",
1210
"allowed_cors_origins": [],
1311
"client_secret_expires_at": 0,
1412
"subject_type": "public",

client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=selfservice.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
{
22
"body": {
3-
"client_name": "",
43
"redirect_uris": [
54
"http://localhost:3000/cb"
65
],
76
"grant_types": [],
87
"response_types": [],
98
"scope": "offline_access offline openid",
109
"audience": [],
11-
"owner": "",
1210
"allowed_cors_origins": [],
1311
"client_secret_expires_at": 0,
1412
"subject_type": "public",

client/.snapshots/TestHandler-common-case=update_the_lifespans_of_an_OAuth2_client.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"response_types": [],
99
"scope": "offline_access offline openid",
1010
"audience": [],
11-
"owner": "",
1211
"allowed_cors_origins": [],
1312
"client_secret_expires_at": 0,
1413
"subject_type": "public",

0 commit comments

Comments
 (0)