From adaffc0d3f50a976fdb293e80b1d36a6e28fdddd Mon Sep 17 00:00:00 2001 From: Jonathan Reyes Date: Thu, 11 Dec 2025 10:12:22 -0700 Subject: [PATCH 1/4] fix(client): add omitempty to optional URI fields in JSON serialization Optional fields (policy_uri, tos_uri, client_uri, logo_uri, contacts) were serialized as empty strings or null when not set. This breaks strict JSON validators like Zod that expect these fields to either be present with valid values or omitted entirely. RFC 7591 specifies these fields as optional, so omitting them when empty is the correct behavior for DCR responses. --- ...ion=basic_dynamic_client_registration.json | 5 --- ...-description=basic_admin_registration.json | 5 --- ...nsent_succeeds_for_admin_registration.json | 5 --- ...case=12-description=empty_ID_succeeds.json | 5 --- ...nts-case=4-description=non-uuid_works.json | 5 --- ...ption=setting_client_id_as_uuid_works.json | 5 --- ...nsent_succeeds_for_admin_registration.json | 5 --- ...tching_existing_client-endpoint=admin.json | 4 --- ..._existing_client-endpoint=selfservice.json | 4 --- ...ate_the_lifespans_of_an_OAuth2_client.json | 4 --- ...dating_existing_client-endpoint=admin.json | 5 --- ...-endpoint=dynamic_client_registration.json | 5 --- ...gistration_tokens-case=0-dynamic=true.json | 5 --- ...istration_tokens-case=1-dynamic=false.json | 5 --- ...istration_tokens-case=2-dynamic=false.json | 5 --- client/client.go | 10 +++--- client/client_test.go | 33 +++++++++++++++++++ ...reateClient-case=creates_successfully.json | 4 --- ...CreateClient-case=supports_encryption.json | 4 --- ...ateClient-case=supports_setting_flags.json | 4 --- .../TestGetClient-case=gets_client.json | 3 -- ...tGetClient-case=gets_multiple_clients.json | 6 ---- ...case=imports_clients_from_single_file.json | 8 ----- ...=performs_appropriate_error_reporting.json | 8 ----- ...pdateClient-case=creates_successfully.json | 4 --- ...UpdateClient-case=supports_encryption.json | 4 --- ...case=updates_from_file-file=from_disk.json | 4 --- ...ent-case=updates_from_file-file=stdin.json | 4 --- ...tCanUseLegacyChallenges-consent_error.json | 5 --- ...eLegacyChallenges-consent_initialized.json | 5 --- ...CanUseLegacyChallenges-consent_unused.json | 5 --- ...stCanUseLegacyChallenges-consent_used.json | 5 --- ...stCanUseLegacyChallenges-device_error.json | 5 --- ...seLegacyChallenges-device_initialized.json | 5 --- ...tCanUseLegacyChallenges-device_unused.json | 5 --- ...estCanUseLegacyChallenges-device_used.json | 5 --- ...estCanUseLegacyChallenges-login_error.json | 5 --- ...UseLegacyChallenges-login_initialized.json | 5 --- ...stCanUseLegacyChallenges-login_unused.json | 5 --- ...TestCanUseLegacyChallenges-login_used.json | 5 --- ...nvalidate_with_valid_consent_verifier.json | 5 --- ...invalidate_with_valid_device_verifier.json | 5 --- ..._invalidate_with_valid_login_verifier.json | 5 --- ...l_decode_with_valid_consent_challenge.json | 5 --- ...ul_decode_with_valid_device_challenge.json | 5 --- ...ful_decode_with_valid_login_challenge.json | 5 --- ...ens_with_extra_claims_consent_request.json | 3 -- ...okens_with_extra_claims_login_request.json | 3 -- ...ens_with_extra_claims_consent_request.json | 3 -- ...okens_with_extra_claims_login_request.json | 3 -- 50 files changed, 38 insertions(+), 232 deletions(-) diff --git a/client/.snapshots/TestHandler-common-case=create_clients-case=0-description=basic_dynamic_client_registration.json b/client/.snapshots/TestHandler-common-case=create_clients-case=0-description=basic_dynamic_client_registration.json index a9ac8197dff..474477b84ef 100644 --- a/client/.snapshots/TestHandler-common-case=create_clients-case=0-description=basic_dynamic_client_registration.json +++ b/client/.snapshots/TestHandler-common-case=create_clients-case=0-description=basic_dynamic_client_registration.json @@ -8,12 +8,7 @@ "scope": "offline_access offline openid", "audience": [], "owner": "", - "policy_uri": "", "allowed_cors_origins": [], - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "public", "jwks": {}, diff --git a/client/.snapshots/TestHandler-common-case=create_clients-case=1-description=basic_admin_registration.json b/client/.snapshots/TestHandler-common-case=create_clients-case=1-description=basic_admin_registration.json index 75972d053bb..195c4232e73 100644 --- a/client/.snapshots/TestHandler-common-case=create_clients-case=1-description=basic_admin_registration.json +++ b/client/.snapshots/TestHandler-common-case=create_clients-case=1-description=basic_admin_registration.json @@ -9,12 +9,7 @@ "scope": "offline_access offline openid", "audience": [], "owner": "", - "policy_uri": "", "allowed_cors_origins": [], - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "public", "jwks": {}, diff --git a/client/.snapshots/TestHandler-common-case=create_clients-case=10-description=setting_skip_logout_consent_succeeds_for_admin_registration.json b/client/.snapshots/TestHandler-common-case=create_clients-case=10-description=setting_skip_logout_consent_succeeds_for_admin_registration.json index 16fb5b31144..27813c6bbe0 100644 --- a/client/.snapshots/TestHandler-common-case=create_clients-case=10-description=setting_skip_logout_consent_succeeds_for_admin_registration.json +++ b/client/.snapshots/TestHandler-common-case=create_clients-case=10-description=setting_skip_logout_consent_succeeds_for_admin_registration.json @@ -9,12 +9,7 @@ "scope": "offline_access offline openid", "audience": [], "owner": "", - "policy_uri": "", "allowed_cors_origins": [], - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "public", "jwks": {}, diff --git a/client/.snapshots/TestHandler-common-case=create_clients-case=12-description=empty_ID_succeeds.json b/client/.snapshots/TestHandler-common-case=create_clients-case=12-description=empty_ID_succeeds.json index 69682c03242..c7518ae416e 100644 --- a/client/.snapshots/TestHandler-common-case=create_clients-case=12-description=empty_ID_succeeds.json +++ b/client/.snapshots/TestHandler-common-case=create_clients-case=12-description=empty_ID_succeeds.json @@ -9,12 +9,7 @@ "scope": "offline_access offline openid", "audience": [], "owner": "", - "policy_uri": "", "allowed_cors_origins": [], - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "public", "jwks": {}, diff --git a/client/.snapshots/TestHandler-common-case=create_clients-case=4-description=non-uuid_works.json b/client/.snapshots/TestHandler-common-case=create_clients-case=4-description=non-uuid_works.json index 25e7e615220..65cdf186e07 100644 --- a/client/.snapshots/TestHandler-common-case=create_clients-case=4-description=non-uuid_works.json +++ b/client/.snapshots/TestHandler-common-case=create_clients-case=4-description=non-uuid_works.json @@ -10,12 +10,7 @@ "scope": "offline_access offline openid", "audience": [], "owner": "", - "policy_uri": "", "allowed_cors_origins": [], - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "public", "jwks": {}, diff --git a/client/.snapshots/TestHandler-common-case=create_clients-case=5-description=setting_client_id_as_uuid_works.json b/client/.snapshots/TestHandler-common-case=create_clients-case=5-description=setting_client_id_as_uuid_works.json index e88c1c9d9be..502723e88c3 100644 --- a/client/.snapshots/TestHandler-common-case=create_clients-case=5-description=setting_client_id_as_uuid_works.json +++ b/client/.snapshots/TestHandler-common-case=create_clients-case=5-description=setting_client_id_as_uuid_works.json @@ -10,12 +10,7 @@ "scope": "offline_access offline openid", "audience": [], "owner": "", - "policy_uri": "", "allowed_cors_origins": [], - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "public", "jwks": {}, diff --git a/client/.snapshots/TestHandler-common-case=create_clients-case=8-description=setting_skip_consent_succeeds_for_admin_registration.json b/client/.snapshots/TestHandler-common-case=create_clients-case=8-description=setting_skip_consent_succeeds_for_admin_registration.json index 1191ae414eb..55030050a10 100644 --- a/client/.snapshots/TestHandler-common-case=create_clients-case=8-description=setting_skip_consent_succeeds_for_admin_registration.json +++ b/client/.snapshots/TestHandler-common-case=create_clients-case=8-description=setting_skip_consent_succeeds_for_admin_registration.json @@ -9,12 +9,7 @@ "scope": "offline_access offline openid", "audience": [], "owner": "", - "policy_uri": "", "allowed_cors_origins": [], - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "public", "jwks": {}, diff --git a/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=admin.json b/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=admin.json index 9fc694022cd..60b37565cfa 100644 --- a/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=admin.json +++ b/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=admin.json @@ -9,11 +9,7 @@ "scope": "offline_access offline openid", "audience": [], "owner": "", - "policy_uri": "", "allowed_cors_origins": [], - "tos_uri": "", - "client_uri": "", - "logo_uri": "", "contacts": [], "client_secret_expires_at": 0, "subject_type": "public", diff --git a/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=selfservice.json b/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=selfservice.json index d6544830e52..40109fdbd7a 100644 --- a/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=selfservice.json +++ b/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=selfservice.json @@ -9,11 +9,7 @@ "scope": "offline_access offline openid", "audience": [], "owner": "", - "policy_uri": "", "allowed_cors_origins": [], - "tos_uri": "", - "client_uri": "", - "logo_uri": "", "contacts": [], "client_secret_expires_at": 0, "subject_type": "public", diff --git a/client/.snapshots/TestHandler-common-case=update_the_lifespans_of_an_OAuth2_client.json b/client/.snapshots/TestHandler-common-case=update_the_lifespans_of_an_OAuth2_client.json index aca2c7bbca9..0aee8796133 100644 --- a/client/.snapshots/TestHandler-common-case=update_the_lifespans_of_an_OAuth2_client.json +++ b/client/.snapshots/TestHandler-common-case=update_the_lifespans_of_an_OAuth2_client.json @@ -9,11 +9,7 @@ "scope": "offline_access offline openid", "audience": [], "owner": "", - "policy_uri": "", "allowed_cors_origins": [], - "tos_uri": "", - "client_uri": "", - "logo_uri": "", "contacts": [], "client_secret_expires_at": 0, "subject_type": "public", diff --git a/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=admin.json b/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=admin.json index 4953cd54220..e7ba1d697f3 100644 --- a/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=admin.json +++ b/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=admin.json @@ -11,12 +11,7 @@ "scope": "offline_access offline openid", "audience": [], "owner": "", - "policy_uri": "", "allowed_cors_origins": [], - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "public", "jwks": {}, diff --git a/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=dynamic_client_registration.json b/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=dynamic_client_registration.json index 5727960363b..801de4aa079 100644 --- a/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=dynamic_client_registration.json +++ b/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=dynamic_client_registration.json @@ -10,12 +10,7 @@ "scope": "offline_access offline openid", "audience": [], "owner": "", - "policy_uri": "", "allowed_cors_origins": [], - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "public", "jwks": {}, diff --git a/client/.snapshots/TestHandler-create_client_registration_tokens-case=0-dynamic=true.json b/client/.snapshots/TestHandler-create_client_registration_tokens-case=0-dynamic=true.json index b161bf055fa..b9bc0125a18 100644 --- a/client/.snapshots/TestHandler-create_client_registration_tokens-case=0-dynamic=true.json +++ b/client/.snapshots/TestHandler-create_client_registration_tokens-case=0-dynamic=true.json @@ -6,12 +6,7 @@ "scope": "", "audience": [], "owner": "", - "policy_uri": "", "allowed_cors_origins": [], - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "", "jwks": {}, diff --git a/client/.snapshots/TestHandler-create_client_registration_tokens-case=1-dynamic=false.json b/client/.snapshots/TestHandler-create_client_registration_tokens-case=1-dynamic=false.json index b161bf055fa..b9bc0125a18 100644 --- a/client/.snapshots/TestHandler-create_client_registration_tokens-case=1-dynamic=false.json +++ b/client/.snapshots/TestHandler-create_client_registration_tokens-case=1-dynamic=false.json @@ -6,12 +6,7 @@ "scope": "", "audience": [], "owner": "", - "policy_uri": "", "allowed_cors_origins": [], - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "", "jwks": {}, diff --git a/client/.snapshots/TestHandler-create_client_registration_tokens-case=2-dynamic=false.json b/client/.snapshots/TestHandler-create_client_registration_tokens-case=2-dynamic=false.json index aa0b8b3ae78..694d8b7ac69 100644 --- a/client/.snapshots/TestHandler-create_client_registration_tokens-case=2-dynamic=false.json +++ b/client/.snapshots/TestHandler-create_client_registration_tokens-case=2-dynamic=false.json @@ -7,12 +7,7 @@ "scope": "", "audience": [], "owner": "", - "policy_uri": "", "allowed_cors_origins": [], - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "", "jwks": {}, diff --git a/client/client.go b/client/client.go index 38ab42bd9ae..394b6b569a5 100644 --- a/client/client.go +++ b/client/client.go @@ -110,7 +110,7 @@ type Client struct { // PolicyURI is a URL string that points to a human-readable privacy policy document // that describes how the deployment organization collects, uses, // retains, and discloses personal data. - PolicyURI string `json:"policy_uri" db:"policy_uri"` + PolicyURI string `json:"policy_uri,omitempty" db:"policy_uri"` // OAuth 2.0 Client Allowed CORS Origins // @@ -126,19 +126,19 @@ type Client struct { // document for the client that describes a contractual relationship // between the end-user and the client that the end-user accepts when // authorizing the client. - TermsOfServiceURI string `json:"tos_uri" db:"tos_uri"` + TermsOfServiceURI string `json:"tos_uri,omitempty" db:"tos_uri"` // OAuth 2.0 Client URI // // ClientURI is a URL string of a web page providing information about the client. // If present, the server SHOULD display this URL to the end-user in // a clickable fashion. - ClientURI string `json:"client_uri" db:"client_uri"` + ClientURI string `json:"client_uri,omitempty" db:"client_uri"` // OAuth 2.0 Client Logo URI // // A URL string referencing the client's logo. - LogoURI string `json:"logo_uri" db:"logo_uri"` + LogoURI string `json:"logo_uri,omitempty" db:"logo_uri"` // OAuth 2.0 Client Contact // @@ -146,7 +146,7 @@ type Client struct { // for this client, typically email addresses. // // Example: help@example.org - Contacts sqlxx.StringSliceJSONFormat `json:"contacts" db:"contacts"` + Contacts sqlxx.StringSliceJSONFormat `json:"contacts,omitempty" db:"contacts"` // OAuth 2.0 Client Secret Expires At // diff --git a/client/client_test.go b/client/client_test.go index cee41d4ab20..f4afc4fa732 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -4,9 +4,11 @@ package client import ( + "encoding/json" "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/ory/hydra/v2/fosite" ) @@ -31,3 +33,34 @@ func TestClient(t *testing.T) { assert.Len(t, c.GetScopes(), 2) assert.EqualValues(t, c.RedirectURIs, c.GetRedirectURIs()) } + +func TestClientJSONOmitsEmptyOptionalURIFields(t *testing.T) { + c := &Client{ + ID: "test-client", + RedirectURIs: []string{"http://localhost/callback"}, + } + + data, err := json.Marshal(c) + require.NoError(t, err) + + var result map[string]interface{} + err = json.Unmarshal(data, &result) + require.NoError(t, err) + + // These optional URI fields should be omitted when empty, not serialized as "" + _, hasLogoURI := result["logo_uri"] + assert.False(t, hasLogoURI, "logo_uri should be omitted when empty") + + _, hasTosURI := result["tos_uri"] + assert.False(t, hasTosURI, "tos_uri should be omitted when empty") + + _, hasPolicyURI := result["policy_uri"] + assert.False(t, hasPolicyURI, "policy_uri should be omitted when empty") + + _, hasClientURI := result["client_uri"] + assert.False(t, hasClientURI, "client_uri should be omitted when empty") + + // contacts should be omitted when nil, not serialized as null + _, hasContacts := result["contacts"] + assert.False(t, hasContacts, "contacts should be omitted when nil") +} diff --git a/cmd/.snapshots/TestCreateClient-case=creates_successfully.json b/cmd/.snapshots/TestCreateClient-case=creates_successfully.json index f20d01cd379..3bbaae82ed5 100644 --- a/cmd/.snapshots/TestCreateClient-case=creates_successfully.json +++ b/cmd/.snapshots/TestCreateClient-case=creates_successfully.json @@ -1,15 +1,12 @@ { "client_name": "", "client_secret_expires_at": 0, - "client_uri": "", "grant_types": [ "authorization_code" ], "jwks": {}, - "logo_uri": "", "metadata": {}, "owner": "", - "policy_uri": "", "request_object_signing_alg": "RS256", "response_types": [ "code" @@ -19,6 +16,5 @@ "skip_logout_consent": false, "subject_type": "public", "token_endpoint_auth_method": "client_secret_basic", - "tos_uri": "", "userinfo_signed_response_alg": "none" } diff --git a/cmd/.snapshots/TestCreateClient-case=supports_encryption.json b/cmd/.snapshots/TestCreateClient-case=supports_encryption.json index 984cedb2f2c..020f7b36a0c 100644 --- a/cmd/.snapshots/TestCreateClient-case=supports_encryption.json +++ b/cmd/.snapshots/TestCreateClient-case=supports_encryption.json @@ -5,17 +5,14 @@ ], "client_name": "", "client_secret_expires_at": 0, - "client_uri": "", "grant_types": [ "authorization_code" ], "jwks": {}, - "logo_uri": "", "metadata": { "foo": "bar" }, "owner": "", - "policy_uri": "", "request_object_signing_alg": "RS256", "response_types": [ "code" @@ -25,6 +22,5 @@ "skip_logout_consent": false, "subject_type": "public", "token_endpoint_auth_method": "client_secret_basic", - "tos_uri": "", "userinfo_signed_response_alg": "none" } diff --git a/cmd/.snapshots/TestCreateClient-case=supports_setting_flags.json b/cmd/.snapshots/TestCreateClient-case=supports_setting_flags.json index 984cedb2f2c..020f7b36a0c 100644 --- a/cmd/.snapshots/TestCreateClient-case=supports_setting_flags.json +++ b/cmd/.snapshots/TestCreateClient-case=supports_setting_flags.json @@ -5,17 +5,14 @@ ], "client_name": "", "client_secret_expires_at": 0, - "client_uri": "", "grant_types": [ "authorization_code" ], "jwks": {}, - "logo_uri": "", "metadata": { "foo": "bar" }, "owner": "", - "policy_uri": "", "request_object_signing_alg": "RS256", "response_types": [ "code" @@ -25,6 +22,5 @@ "skip_logout_consent": false, "subject_type": "public", "token_endpoint_auth_method": "client_secret_basic", - "tos_uri": "", "userinfo_signed_response_alg": "none" } diff --git a/cmd/.snapshots/TestGetClient-case=gets_client.json b/cmd/.snapshots/TestGetClient-case=gets_client.json index 5c482bdb99a..01cf124a2cc 100644 --- a/cmd/.snapshots/TestGetClient-case=gets_client.json +++ b/cmd/.snapshots/TestGetClient-case=gets_client.json @@ -1,12 +1,9 @@ { "client_name": "", "client_secret_expires_at": 0, - "client_uri": "", "jwks": {}, - "logo_uri": "", "metadata": {}, "owner": "", - "policy_uri": "", "scope": "", "skip_consent": false, "subject_type": "", diff --git a/cmd/.snapshots/TestGetClient-case=gets_multiple_clients.json b/cmd/.snapshots/TestGetClient-case=gets_multiple_clients.json index 1685a7ccfd8..df2cd2d0003 100644 --- a/cmd/.snapshots/TestGetClient-case=gets_multiple_clients.json +++ b/cmd/.snapshots/TestGetClient-case=gets_multiple_clients.json @@ -4,14 +4,11 @@ "audience": [], "client_name": "", "client_secret_expires_at": 0, - "client_uri": "", "contacts": [], "grant_types": [], "jwks": {}, - "logo_uri": "", "metadata": {}, "owner": "", - "policy_uri": "", "redirect_uris": [], "response_types": [], "scope": "", @@ -25,14 +22,11 @@ "audience": [], "client_name": "", "client_secret_expires_at": 0, - "client_uri": "", "contacts": [], "grant_types": [], "jwks": {}, - "logo_uri": "", "metadata": {}, "owner": "", - "policy_uri": "", "redirect_uris": [], "response_types": [], "scope": "", diff --git a/cmd/.snapshots/TestImportClient-case=imports_clients_from_single_file.json b/cmd/.snapshots/TestImportClient-case=imports_clients_from_single_file.json index 6ca11ca6230..03bf7479942 100644 --- a/cmd/.snapshots/TestImportClient-case=imports_clients_from_single_file.json +++ b/cmd/.snapshots/TestImportClient-case=imports_clients_from_single_file.json @@ -4,17 +4,13 @@ "audience": [], "client_name": "", "client_secret_expires_at": 0, - "client_uri": "", "jwks": {}, - "logo_uri": "", "metadata": {}, "owner": "", - "policy_uri": "", "scope": "foo", "skip_consent": false, "subject_type": "public", "token_endpoint_auth_method": "client_secret_basic", - "tos_uri": "", "userinfo_signed_response_alg": "none" }, { @@ -22,17 +18,13 @@ "audience": [], "client_name": "", "client_secret_expires_at": 0, - "client_uri": "", "jwks": {}, - "logo_uri": "", "metadata": {}, "owner": "", - "policy_uri": "", "scope": "bar", "skip_consent": false, "subject_type": "public", "token_endpoint_auth_method": "client_secret_basic", - "tos_uri": "", "userinfo_signed_response_alg": "none" } ] diff --git a/cmd/.snapshots/TestImportClient-case=performs_appropriate_error_reporting.json b/cmd/.snapshots/TestImportClient-case=performs_appropriate_error_reporting.json index 6ca11ca6230..03bf7479942 100644 --- a/cmd/.snapshots/TestImportClient-case=performs_appropriate_error_reporting.json +++ b/cmd/.snapshots/TestImportClient-case=performs_appropriate_error_reporting.json @@ -4,17 +4,13 @@ "audience": [], "client_name": "", "client_secret_expires_at": 0, - "client_uri": "", "jwks": {}, - "logo_uri": "", "metadata": {}, "owner": "", - "policy_uri": "", "scope": "foo", "skip_consent": false, "subject_type": "public", "token_endpoint_auth_method": "client_secret_basic", - "tos_uri": "", "userinfo_signed_response_alg": "none" }, { @@ -22,17 +18,13 @@ "audience": [], "client_name": "", "client_secret_expires_at": 0, - "client_uri": "", "jwks": {}, - "logo_uri": "", "metadata": {}, "owner": "", - "policy_uri": "", "scope": "bar", "skip_consent": false, "subject_type": "public", "token_endpoint_auth_method": "client_secret_basic", - "tos_uri": "", "userinfo_signed_response_alg": "none" } ] diff --git a/cmd/.snapshots/TestUpdateClient-case=creates_successfully.json b/cmd/.snapshots/TestUpdateClient-case=creates_successfully.json index c62158c5d9d..50424202b65 100644 --- a/cmd/.snapshots/TestUpdateClient-case=creates_successfully.json +++ b/cmd/.snapshots/TestUpdateClient-case=creates_successfully.json @@ -1,15 +1,12 @@ { "client_name": "", "client_secret_expires_at": 0, - "client_uri": "", "grant_types": [ "implicit" ], "jwks": {}, - "logo_uri": "", "metadata": {}, "owner": "", - "policy_uri": "", "request_object_signing_alg": "RS256", "response_types": [ "code" @@ -19,6 +16,5 @@ "skip_logout_consent": false, "subject_type": "public", "token_endpoint_auth_method": "client_secret_basic", - "tos_uri": "", "userinfo_signed_response_alg": "none" } diff --git a/cmd/.snapshots/TestUpdateClient-case=supports_encryption.json b/cmd/.snapshots/TestUpdateClient-case=supports_encryption.json index c62158c5d9d..50424202b65 100644 --- a/cmd/.snapshots/TestUpdateClient-case=supports_encryption.json +++ b/cmd/.snapshots/TestUpdateClient-case=supports_encryption.json @@ -1,15 +1,12 @@ { "client_name": "", "client_secret_expires_at": 0, - "client_uri": "", "grant_types": [ "implicit" ], "jwks": {}, - "logo_uri": "", "metadata": {}, "owner": "", - "policy_uri": "", "request_object_signing_alg": "RS256", "response_types": [ "code" @@ -19,6 +16,5 @@ "skip_logout_consent": false, "subject_type": "public", "token_endpoint_auth_method": "client_secret_basic", - "tos_uri": "", "userinfo_signed_response_alg": "none" } diff --git a/cmd/.snapshots/TestUpdateClient-case=updates_from_file-file=from_disk.json b/cmd/.snapshots/TestUpdateClient-case=updates_from_file-file=from_disk.json index e9a42532a2f..4ebcc7609a4 100644 --- a/cmd/.snapshots/TestUpdateClient-case=updates_from_file-file=from_disk.json +++ b/cmd/.snapshots/TestUpdateClient-case=updates_from_file-file=from_disk.json @@ -1,15 +1,12 @@ { "client_name": "updated through file from disk", "client_secret_expires_at": 0, - "client_uri": "", "grant_types": [ "implicit" ], "jwks": {}, - "logo_uri": "", "metadata": {}, "owner": "", - "policy_uri": "", "request_object_signing_alg": "RS256", "response_types": [ "code" @@ -19,6 +16,5 @@ "skip_logout_consent": false, "subject_type": "public", "token_endpoint_auth_method": "client_secret_basic", - "tos_uri": "", "userinfo_signed_response_alg": "none" } diff --git a/cmd/.snapshots/TestUpdateClient-case=updates_from_file-file=stdin.json b/cmd/.snapshots/TestUpdateClient-case=updates_from_file-file=stdin.json index 4491f0eed55..42795829507 100644 --- a/cmd/.snapshots/TestUpdateClient-case=updates_from_file-file=stdin.json +++ b/cmd/.snapshots/TestUpdateClient-case=updates_from_file-file=stdin.json @@ -1,15 +1,12 @@ { "client_name": "updated through file stdin", "client_secret_expires_at": 0, - "client_uri": "", "grant_types": [ "implicit" ], "jwks": {}, - "logo_uri": "", "metadata": {}, "owner": "", - "policy_uri": "", "request_object_signing_alg": "RS256", "response_types": [ "code" @@ -19,6 +16,5 @@ "skip_logout_consent": false, "subject_type": "public", "token_endpoint_auth_method": "client_secret_basic", - "tos_uri": "", "userinfo_signed_response_alg": "none" } diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-consent_error.json b/flow/.snapshots/TestCanUseLegacyChallenges-consent_error.json index 0eb8a7f13ba..11abd38d6fd 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-consent_error.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-consent_error.json @@ -33,12 +33,7 @@ "scope": "", "audience": null, "owner": "", - "policy_uri": "", "allowed_cors_origins": null, - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "", "created_at": "0001-01-01T00:00:00Z", diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-consent_initialized.json b/flow/.snapshots/TestCanUseLegacyChallenges-consent_initialized.json index 9097751407c..7bedc54dc87 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-consent_initialized.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-consent_initialized.json @@ -33,12 +33,7 @@ "scope": "", "audience": null, "owner": "", - "policy_uri": "", "allowed_cors_origins": null, - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "", "created_at": "0001-01-01T00:00:00Z", diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-consent_unused.json b/flow/.snapshots/TestCanUseLegacyChallenges-consent_unused.json index 75fe0582431..59234d4023f 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-consent_unused.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-consent_unused.json @@ -33,12 +33,7 @@ "scope": "", "audience": null, "owner": "", - "policy_uri": "", "allowed_cors_origins": null, - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "", "created_at": "0001-01-01T00:00:00Z", diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-consent_used.json b/flow/.snapshots/TestCanUseLegacyChallenges-consent_used.json index 1fc76cf601b..fb66a5c8be2 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-consent_used.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-consent_used.json @@ -33,12 +33,7 @@ "scope": "", "audience": null, "owner": "", - "policy_uri": "", "allowed_cors_origins": null, - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "", "created_at": "0001-01-01T00:00:00Z", diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-device_error.json b/flow/.snapshots/TestCanUseLegacyChallenges-device_error.json index a7eaa304869..6f6490400c9 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-device_error.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-device_error.json @@ -33,12 +33,7 @@ "scope": "", "audience": null, "owner": "", - "policy_uri": "", "allowed_cors_origins": null, - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "", "created_at": "0001-01-01T00:00:00Z", diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-device_initialized.json b/flow/.snapshots/TestCanUseLegacyChallenges-device_initialized.json index 15cf9775ec7..8c1e2a5d363 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-device_initialized.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-device_initialized.json @@ -33,12 +33,7 @@ "scope": "", "audience": null, "owner": "", - "policy_uri": "", "allowed_cors_origins": null, - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "", "created_at": "0001-01-01T00:00:00Z", diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-device_unused.json b/flow/.snapshots/TestCanUseLegacyChallenges-device_unused.json index fabc7a90ee1..63da69fe6a3 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-device_unused.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-device_unused.json @@ -33,12 +33,7 @@ "scope": "", "audience": null, "owner": "", - "policy_uri": "", "allowed_cors_origins": null, - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "", "created_at": "0001-01-01T00:00:00Z", diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-device_used.json b/flow/.snapshots/TestCanUseLegacyChallenges-device_used.json index b4df2d3d653..6ff2609e05f 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-device_used.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-device_used.json @@ -33,12 +33,7 @@ "scope": "", "audience": null, "owner": "", - "policy_uri": "", "allowed_cors_origins": null, - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "", "created_at": "0001-01-01T00:00:00Z", diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-login_error.json b/flow/.snapshots/TestCanUseLegacyChallenges-login_error.json index fea668a491d..d63f6216d97 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-login_error.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-login_error.json @@ -33,12 +33,7 @@ "scope": "", "audience": null, "owner": "", - "policy_uri": "", "allowed_cors_origins": null, - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "", "created_at": "0001-01-01T00:00:00Z", diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-login_initialized.json b/flow/.snapshots/TestCanUseLegacyChallenges-login_initialized.json index 3ce62ac6540..7ecab04857f 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-login_initialized.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-login_initialized.json @@ -33,12 +33,7 @@ "scope": "", "audience": null, "owner": "", - "policy_uri": "", "allowed_cors_origins": null, - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "", "created_at": "0001-01-01T00:00:00Z", diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-login_unused.json b/flow/.snapshots/TestCanUseLegacyChallenges-login_unused.json index 085831bef1b..a6a89e8e185 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-login_unused.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-login_unused.json @@ -33,12 +33,7 @@ "scope": "", "audience": null, "owner": "", - "policy_uri": "", "allowed_cors_origins": null, - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "", "created_at": "0001-01-01T00:00:00Z", diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-login_used.json b/flow/.snapshots/TestCanUseLegacyChallenges-login_used.json index d16752162b8..c649423d0ac 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-login_used.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-login_used.json @@ -33,12 +33,7 @@ "scope": "", "audience": null, "owner": "", - "policy_uri": "", "allowed_cors_origins": null, - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "", "created_at": "0001-01-01T00:00:00Z", diff --git a/flow/.snapshots/TestDecodeAndInvalidateConsentVerifier-case=successful_decode_and_invalidate_with_valid_consent_verifier.json b/flow/.snapshots/TestDecodeAndInvalidateConsentVerifier-case=successful_decode_and_invalidate_with_valid_consent_verifier.json index 883f64f54c2..a65338d88a0 100644 --- a/flow/.snapshots/TestDecodeAndInvalidateConsentVerifier-case=successful_decode_and_invalidate_with_valid_consent_verifier.json +++ b/flow/.snapshots/TestDecodeAndInvalidateConsentVerifier-case=successful_decode_and_invalidate_with_valid_consent_verifier.json @@ -32,12 +32,7 @@ "scope": "", "audience": null, "owner": "", - "policy_uri": "", "allowed_cors_origins": null, - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "", "created_at": "0001-01-01T00:00:00Z", diff --git a/flow/.snapshots/TestDecodeAndInvalidateDeviceVerifier-case=successful_decode_and_invalidate_with_valid_device_verifier.json b/flow/.snapshots/TestDecodeAndInvalidateDeviceVerifier-case=successful_decode_and_invalidate_with_valid_device_verifier.json index 7ca27b794ab..264655f5395 100644 --- a/flow/.snapshots/TestDecodeAndInvalidateDeviceVerifier-case=successful_decode_and_invalidate_with_valid_device_verifier.json +++ b/flow/.snapshots/TestDecodeAndInvalidateDeviceVerifier-case=successful_decode_and_invalidate_with_valid_device_verifier.json @@ -32,12 +32,7 @@ "scope": "", "audience": null, "owner": "", - "policy_uri": "", "allowed_cors_origins": null, - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "", "created_at": "0001-01-01T00:00:00Z", diff --git a/flow/.snapshots/TestDecodeAndInvalidateLoginVerifier-case=successful_decode_and_invalidate_with_valid_login_verifier.json b/flow/.snapshots/TestDecodeAndInvalidateLoginVerifier-case=successful_decode_and_invalidate_with_valid_login_verifier.json index 6fe30db4a2d..b7464797a81 100644 --- a/flow/.snapshots/TestDecodeAndInvalidateLoginVerifier-case=successful_decode_and_invalidate_with_valid_login_verifier.json +++ b/flow/.snapshots/TestDecodeAndInvalidateLoginVerifier-case=successful_decode_and_invalidate_with_valid_login_verifier.json @@ -32,12 +32,7 @@ "scope": "", "audience": null, "owner": "", - "policy_uri": "", "allowed_cors_origins": null, - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "", "created_at": "0001-01-01T00:00:00Z", diff --git a/flow/.snapshots/TestDecodeFromConsentChallenge-case=successful_decode_with_valid_consent_challenge.json b/flow/.snapshots/TestDecodeFromConsentChallenge-case=successful_decode_with_valid_consent_challenge.json index 6bab0bdd3ef..1cfffdd44f9 100644 --- a/flow/.snapshots/TestDecodeFromConsentChallenge-case=successful_decode_with_valid_consent_challenge.json +++ b/flow/.snapshots/TestDecodeFromConsentChallenge-case=successful_decode_with_valid_consent_challenge.json @@ -32,12 +32,7 @@ "scope": "", "audience": null, "owner": "", - "policy_uri": "", "allowed_cors_origins": null, - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "", "created_at": "0001-01-01T00:00:00Z", diff --git a/flow/.snapshots/TestDecodeFromDeviceChallenge-case=successful_decode_with_valid_device_challenge.json b/flow/.snapshots/TestDecodeFromDeviceChallenge-case=successful_decode_with_valid_device_challenge.json index 3a8753db1ae..92728f9ba40 100644 --- a/flow/.snapshots/TestDecodeFromDeviceChallenge-case=successful_decode_with_valid_device_challenge.json +++ b/flow/.snapshots/TestDecodeFromDeviceChallenge-case=successful_decode_with_valid_device_challenge.json @@ -32,12 +32,7 @@ "scope": "", "audience": null, "owner": "", - "policy_uri": "", "allowed_cors_origins": null, - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "", "created_at": "0001-01-01T00:00:00Z", diff --git a/flow/.snapshots/TestDecodeFromLoginChallenge-case=successful_decode_with_valid_login_challenge.json b/flow/.snapshots/TestDecodeFromLoginChallenge-case=successful_decode_with_valid_login_challenge.json index d7f2dcf4e04..63c66e791fb 100644 --- a/flow/.snapshots/TestDecodeFromLoginChallenge-case=successful_decode_with_valid_login_challenge.json +++ b/flow/.snapshots/TestDecodeFromLoginChallenge-case=successful_decode_with_valid_login_challenge.json @@ -32,12 +32,7 @@ "scope": "", "audience": null, "owner": "", - "policy_uri": "", "allowed_cors_origins": null, - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, "subject_type": "", "created_at": "0001-01-01T00:00:00Z", diff --git a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_consent_request.json b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_consent_request.json index 149180ca51d..02b2e52a435 100644 --- a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_consent_request.json +++ b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_consent_request.json @@ -14,7 +14,6 @@ "client_id": "64f78bf1-f388-4eeb-9fee-e7207226c6be-jwt", "client_name": "", "client_secret_expires_at": 0, - "client_uri": "", "contacts": [], "grant_types": [ "implicit", @@ -24,10 +23,8 @@ "client_credentials" ], "jwks": {}, - "logo_uri": "", "metadata": {}, "owner": "", - "policy_uri": "", "redirect_uris": [ "https://client.ory/callback" ], diff --git a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_login_request.json b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_login_request.json index e823adef92b..2fa4a43fbed 100644 --- a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_login_request.json +++ b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_login_request.json @@ -9,7 +9,6 @@ "client_id": "64f78bf1-f388-4eeb-9fee-e7207226c6be-jwt", "client_name": "", "client_secret_expires_at": 0, - "client_uri": "", "contacts": [], "grant_types": [ "implicit", @@ -19,10 +18,8 @@ "client_credentials" ], "jwks": {}, - "logo_uri": "", "metadata": {}, "owner": "", - "policy_uri": "", "redirect_uris": [ "https://client.ory/callback" ], diff --git a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_consent_request.json b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_consent_request.json index f297515a26f..15f9503278f 100644 --- a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_consent_request.json +++ b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_consent_request.json @@ -14,7 +14,6 @@ "client_id": "64f78bf1-f388-4eeb-9fee-e7207226c6be-opaque", "client_name": "", "client_secret_expires_at": 0, - "client_uri": "", "contacts": [], "grant_types": [ "implicit", @@ -24,10 +23,8 @@ "client_credentials" ], "jwks": {}, - "logo_uri": "", "metadata": {}, "owner": "", - "policy_uri": "", "redirect_uris": [ "https://client.ory/callback" ], diff --git a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_login_request.json b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_login_request.json index 6e18cae17b0..d668e67fcb2 100644 --- a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_login_request.json +++ b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_login_request.json @@ -9,7 +9,6 @@ "client_id": "64f78bf1-f388-4eeb-9fee-e7207226c6be-opaque", "client_name": "", "client_secret_expires_at": 0, - "client_uri": "", "contacts": [], "grant_types": [ "implicit", @@ -19,10 +18,8 @@ "client_credentials" ], "jwks": {}, - "logo_uri": "", "metadata": {}, "owner": "", - "policy_uri": "", "redirect_uris": [ "https://client.ory/callback" ], From a848a7115c0707aa9c5ed273fc662cc6590b41dd Mon Sep 17 00:00:00 2001 From: Jonathan Reyes Date: Thu, 11 Dec 2025 12:22:49 -0700 Subject: [PATCH 2/4] fix(client): update snapshot and fix import ordering Remove contacts field from snapshot to match omitempty serialization and fix goimports ordering in oryx package files to pass CI format check. --- ...mmon-case=fetching_existing_client-endpoint=admin.json | 1 - ...ase=fetching_existing_client-endpoint=selfservice.json | 1 - ...mon-case=update_the_lifespans_of_an_OAuth2_client.json | 1 - cmd/.snapshots/TestGetClient-case=gets_client.json | 3 +-- .../TestGetClient-case=gets_multiple_clients.json | 8 ++------ ...s_and_id_tokens_with_extra_claims_consent_request.json | 4 +--- ...ess_and_id_tokens_with_extra_claims_login_request.json | 4 +--- ...s_and_id_tokens_with_extra_claims_consent_request.json | 4 +--- ...ess_and_id_tokens_with_extra_claims_login_request.json | 4 +--- oryx/dbal/testhelpers.go | 2 +- oryx/hasherx/hasher_bcrypt.go | 5 ++--- oryx/hasherx/hasher_pbkdf2.go | 3 ++- 12 files changed, 12 insertions(+), 28 deletions(-) diff --git a/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=admin.json b/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=admin.json index 60b37565cfa..0def2443a9a 100644 --- a/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=admin.json +++ b/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=admin.json @@ -10,7 +10,6 @@ "audience": [], "owner": "", "allowed_cors_origins": [], - "contacts": [], "client_secret_expires_at": 0, "subject_type": "public", "jwks": {}, diff --git a/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=selfservice.json b/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=selfservice.json index 40109fdbd7a..302351a3fa2 100644 --- a/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=selfservice.json +++ b/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=selfservice.json @@ -10,7 +10,6 @@ "audience": [], "owner": "", "allowed_cors_origins": [], - "contacts": [], "client_secret_expires_at": 0, "subject_type": "public", "jwks": {}, diff --git a/client/.snapshots/TestHandler-common-case=update_the_lifespans_of_an_OAuth2_client.json b/client/.snapshots/TestHandler-common-case=update_the_lifespans_of_an_OAuth2_client.json index 0aee8796133..f564e1d0f1e 100644 --- a/client/.snapshots/TestHandler-common-case=update_the_lifespans_of_an_OAuth2_client.json +++ b/client/.snapshots/TestHandler-common-case=update_the_lifespans_of_an_OAuth2_client.json @@ -10,7 +10,6 @@ "audience": [], "owner": "", "allowed_cors_origins": [], - "contacts": [], "client_secret_expires_at": 0, "subject_type": "public", "jwks": {}, diff --git a/cmd/.snapshots/TestGetClient-case=gets_client.json b/cmd/.snapshots/TestGetClient-case=gets_client.json index 01cf124a2cc..289fc594102 100644 --- a/cmd/.snapshots/TestGetClient-case=gets_client.json +++ b/cmd/.snapshots/TestGetClient-case=gets_client.json @@ -7,6 +7,5 @@ "scope": "", "skip_consent": false, "subject_type": "", - "token_endpoint_auth_method": "client_secret_post", - "tos_uri": "" + "token_endpoint_auth_method": "client_secret_post" } diff --git a/cmd/.snapshots/TestGetClient-case=gets_multiple_clients.json b/cmd/.snapshots/TestGetClient-case=gets_multiple_clients.json index df2cd2d0003..2e6cb04b08b 100644 --- a/cmd/.snapshots/TestGetClient-case=gets_multiple_clients.json +++ b/cmd/.snapshots/TestGetClient-case=gets_multiple_clients.json @@ -4,7 +4,6 @@ "audience": [], "client_name": "", "client_secret_expires_at": 0, - "contacts": [], "grant_types": [], "jwks": {}, "metadata": {}, @@ -14,15 +13,13 @@ "scope": "", "skip_consent": false, "subject_type": "", - "token_endpoint_auth_method": "client_secret_post", - "tos_uri": "" + "token_endpoint_auth_method": "client_secret_post" }, { "allowed_cors_origins": [], "audience": [], "client_name": "", "client_secret_expires_at": 0, - "contacts": [], "grant_types": [], "jwks": {}, "metadata": {}, @@ -32,7 +29,6 @@ "scope": "", "skip_consent": false, "subject_type": "", - "token_endpoint_auth_method": "client_secret_post", - "tos_uri": "" + "token_endpoint_auth_method": "client_secret_post" } ] diff --git a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_consent_request.json b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_consent_request.json index 02b2e52a435..ec9beca1714 100644 --- a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_consent_request.json +++ b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_consent_request.json @@ -14,7 +14,6 @@ "client_id": "64f78bf1-f388-4eeb-9fee-e7207226c6be-jwt", "client_name": "", "client_secret_expires_at": 0, - "contacts": [], "grant_types": [ "implicit", "refresh_token", @@ -35,8 +34,7 @@ ], "scope": "hydra offline openid", "skip_consent": false, - "subject_type": "", - "tos_uri": "" + "subject_type": "" }, "oidc_context": {}, "requested_access_token_audience": [], diff --git a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_login_request.json b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_login_request.json index 2fa4a43fbed..da18bc7c779 100644 --- a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_login_request.json +++ b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_login_request.json @@ -9,7 +9,6 @@ "client_id": "64f78bf1-f388-4eeb-9fee-e7207226c6be-jwt", "client_name": "", "client_secret_expires_at": 0, - "contacts": [], "grant_types": [ "implicit", "refresh_token", @@ -30,8 +29,7 @@ ], "scope": "hydra offline openid", "skip_consent": false, - "subject_type": "", - "tos_uri": "" + "subject_type": "" }, "oidc_context": {}, "requested_access_token_audience": [], diff --git a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_consent_request.json b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_consent_request.json index 15f9503278f..c61d28cb5fd 100644 --- a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_consent_request.json +++ b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_consent_request.json @@ -14,7 +14,6 @@ "client_id": "64f78bf1-f388-4eeb-9fee-e7207226c6be-opaque", "client_name": "", "client_secret_expires_at": 0, - "contacts": [], "grant_types": [ "implicit", "refresh_token", @@ -35,8 +34,7 @@ ], "scope": "hydra offline openid", "skip_consent": false, - "subject_type": "", - "tos_uri": "" + "subject_type": "" }, "oidc_context": {}, "requested_access_token_audience": [], diff --git a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_login_request.json b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_login_request.json index d668e67fcb2..14a33f61ad7 100644 --- a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_login_request.json +++ b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_login_request.json @@ -9,7 +9,6 @@ "client_id": "64f78bf1-f388-4eeb-9fee-e7207226c6be-opaque", "client_name": "", "client_secret_expires_at": 0, - "contacts": [], "grant_types": [ "implicit", "refresh_token", @@ -30,8 +29,7 @@ ], "scope": "hydra offline openid", "skip_consent": false, - "subject_type": "", - "tos_uri": "" + "subject_type": "" }, "oidc_context": {}, "requested_access_token_audience": [], diff --git a/oryx/dbal/testhelpers.go b/oryx/dbal/testhelpers.go index b13d0109614..9cbd8c6a481 100644 --- a/oryx/dbal/testhelpers.go +++ b/oryx/dbal/testhelpers.go @@ -10,12 +10,12 @@ import ( "regexp" "testing" - "github.com/ory/x/sqlcon/dockertest" "github.com/pkg/errors" "github.com/stretchr/testify/require" "github.com/ory/pop/v6" "github.com/ory/x/fsx" + "github.com/ory/x/sqlcon/dockertest" ) var hashDumpRegex = regexp.MustCompile(`-- migrations hash: ([^\n]+)\n`) diff --git a/oryx/hasherx/hasher_bcrypt.go b/oryx/hasherx/hasher_bcrypt.go index 6219617099e..64be1f41d3a 100644 --- a/oryx/hasherx/hasher_bcrypt.go +++ b/oryx/hasherx/hasher_bcrypt.go @@ -3,13 +3,12 @@ package hasherx import ( "context" - "github.com/ory/x/otelx" "github.com/pkg/errors" - "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" - "golang.org/x/crypto/bcrypt" + + "github.com/ory/x/otelx" ) // ErrBcryptPasswordLengthReached is returned when the password is longer than 72 bytes. diff --git a/oryx/hasherx/hasher_pbkdf2.go b/oryx/hasherx/hasher_pbkdf2.go index 6897c52e240..de659552a77 100644 --- a/oryx/hasherx/hasher_pbkdf2.go +++ b/oryx/hasherx/hasher_pbkdf2.go @@ -11,12 +11,13 @@ import ( "fmt" "hash" - "github.com/ory/x/otelx" "github.com/pkg/errors" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/codes" "golang.org/x/crypto/pbkdf2" "golang.org/x/crypto/sha3" + + "github.com/ory/x/otelx" ) type ( From 58f2e14d98ed5b17336d7cf3fb2c7a62bb0f8b3d Mon Sep 17 00:00:00 2001 From: Jonathan Reyes Date: Thu, 11 Dec 2025 14:11:55 -0700 Subject: [PATCH 3/4] 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 --- ...e=0-description=basic_dynamic_client_registration.json | 2 -- ...ients-case=1-description=basic_admin_registration.json | 2 -- ...ip_logout_consent_succeeds_for_admin_registration.json | 2 -- ...ate_clients-case=12-description=empty_ID_succeeds.json | 2 -- ...=create_clients-case=4-description=non-uuid_works.json | 2 -- ...ase=5-description=setting_client_id_as_uuid_works.json | 2 -- ...ting_skip_consent_succeeds_for_admin_registration.json | 2 -- ...mmon-case=fetching_existing_client-endpoint=admin.json | 2 -- ...ase=fetching_existing_client-endpoint=selfservice.json | 2 -- ...mon-case=update_the_lifespans_of_an_OAuth2_client.json | 1 - ...mmon-case=updating_existing_client-endpoint=admin.json | 2 -- ...sting_client-endpoint=dynamic_client_registration.json | 2 -- ...te_client_registration_tokens-case=0-dynamic=true.json | 4 ---- ...e_client_registration_tokens-case=1-dynamic=false.json | 4 ---- ...e_client_registration_tokens-case=2-dynamic=false.json | 4 ---- client/client.go | 8 ++++---- .../TestCreateClient-case=creates_successfully.json | 2 -- .../TestCreateClient-case=supports_encryption.json | 2 -- .../TestCreateClient-case=supports_setting_flags.json | 2 -- cmd/.snapshots/TestGetClient-case=gets_client.json | 4 ---- .../TestGetClient-case=gets_multiple_clients.json | 8 -------- ...mportClient-case=imports_clients_from_single_file.json | 4 ---- ...tClient-case=performs_appropriate_error_reporting.json | 4 ---- .../TestUpdateClient-case=creates_successfully.json | 2 -- .../TestUpdateClient-case=supports_encryption.json | 2 -- ...pdateClient-case=updates_from_file-file=from_disk.json | 1 - ...estUpdateClient-case=updates_from_file-file=stdin.json | 1 - .../TestCanUseLegacyChallenges-consent_error.json | 4 ---- .../TestCanUseLegacyChallenges-consent_initialized.json | 4 ---- .../TestCanUseLegacyChallenges-consent_unused.json | 4 ---- .../TestCanUseLegacyChallenges-consent_used.json | 4 ---- .../TestCanUseLegacyChallenges-device_error.json | 4 ---- .../TestCanUseLegacyChallenges-device_initialized.json | 4 ---- .../TestCanUseLegacyChallenges-device_unused.json | 4 ---- .../TestCanUseLegacyChallenges-device_used.json | 4 ---- .../TestCanUseLegacyChallenges-login_error.json | 4 ---- .../TestCanUseLegacyChallenges-login_initialized.json | 4 ---- .../TestCanUseLegacyChallenges-login_unused.json | 4 ---- .../.snapshots/TestCanUseLegacyChallenges-login_used.json | 4 ---- ...decode_and_invalidate_with_valid_consent_verifier.json | 4 ---- ..._decode_and_invalidate_with_valid_device_verifier.json | 4 ---- ...l_decode_and_invalidate_with_valid_login_verifier.json | 4 ---- ...se=successful_decode_with_valid_consent_challenge.json | 4 ---- ...ase=successful_decode_with_valid_device_challenge.json | 4 ---- ...case=successful_decode_with_valid_login_challenge.json | 4 ---- ...s_and_id_tokens_with_extra_claims_consent_request.json | 5 +---- ...ess_and_id_tokens_with_extra_claims_login_request.json | 5 +---- ...s_and_id_tokens_with_extra_claims_consent_request.json | 5 +---- ...ess_and_id_tokens_with_extra_claims_login_request.json | 5 +---- ...call_refresh_token_hook_if_configured-hook=legacy.json | 3 +-- ...ld_call_refresh_token_hook_if_configured-hook=new.json | 3 +-- ...call_refresh_token_hook_if_configured-hook=legacy.json | 3 +-- ...ld_call_refresh_token_hook_if_configured-hook=new.json | 3 +-- ...call_refresh_token_hook_if_configured-hook=legacy.json | 3 +-- ...ld_call_refresh_token_hook_if_configured-hook=new.json | 3 +-- ...call_refresh_token_hook_if_configured-hook=legacy.json | 3 +-- ...ld_call_refresh_token_hook_if_configured-hook=new.json | 3 +-- ...call_refresh_token_hook_if_configured-hook=legacy.json | 3 +-- ...ld_call_refresh_token_hook_if_configured-hook=new.json | 3 +-- ...call_refresh_token_hook_if_configured-hook=legacy.json | 3 +-- ...ld_call_refresh_token_hook_if_configured-hook=new.json | 3 +-- 61 files changed, 20 insertions(+), 183 deletions(-) diff --git a/client/.snapshots/TestHandler-common-case=create_clients-case=0-description=basic_dynamic_client_registration.json b/client/.snapshots/TestHandler-common-case=create_clients-case=0-description=basic_dynamic_client_registration.json index 474477b84ef..d8f579405fe 100644 --- a/client/.snapshots/TestHandler-common-case=create_clients-case=0-description=basic_dynamic_client_registration.json +++ b/client/.snapshots/TestHandler-common-case=create_clients-case=0-description=basic_dynamic_client_registration.json @@ -1,5 +1,4 @@ { - "client_name": "", "redirect_uris": [ "http://localhost:3000/cb" ], @@ -7,7 +6,6 @@ "response_types": null, "scope": "offline_access offline openid", "audience": [], - "owner": "", "allowed_cors_origins": [], "client_secret_expires_at": 0, "subject_type": "public", diff --git a/client/.snapshots/TestHandler-common-case=create_clients-case=1-description=basic_admin_registration.json b/client/.snapshots/TestHandler-common-case=create_clients-case=1-description=basic_admin_registration.json index 195c4232e73..b533c562097 100644 --- a/client/.snapshots/TestHandler-common-case=create_clients-case=1-description=basic_admin_registration.json +++ b/client/.snapshots/TestHandler-common-case=create_clients-case=1-description=basic_admin_registration.json @@ -1,5 +1,4 @@ { - "client_name": "", "client_secret": "averylongsecret", "redirect_uris": [ "http://localhost:3000/cb" @@ -8,7 +7,6 @@ "response_types": null, "scope": "offline_access offline openid", "audience": [], - "owner": "", "allowed_cors_origins": [], "client_secret_expires_at": 0, "subject_type": "public", diff --git a/client/.snapshots/TestHandler-common-case=create_clients-case=10-description=setting_skip_logout_consent_succeeds_for_admin_registration.json b/client/.snapshots/TestHandler-common-case=create_clients-case=10-description=setting_skip_logout_consent_succeeds_for_admin_registration.json index 27813c6bbe0..757bc8fedb5 100644 --- a/client/.snapshots/TestHandler-common-case=create_clients-case=10-description=setting_skip_logout_consent_succeeds_for_admin_registration.json +++ b/client/.snapshots/TestHandler-common-case=create_clients-case=10-description=setting_skip_logout_consent_succeeds_for_admin_registration.json @@ -1,5 +1,4 @@ { - "client_name": "", "client_secret": "2SKZkBf2P5g4toAXXnCrr~_sDM", "redirect_uris": [ "http://localhost:3000/cb" @@ -8,7 +7,6 @@ "response_types": null, "scope": "offline_access offline openid", "audience": [], - "owner": "", "allowed_cors_origins": [], "client_secret_expires_at": 0, "subject_type": "public", diff --git a/client/.snapshots/TestHandler-common-case=create_clients-case=12-description=empty_ID_succeeds.json b/client/.snapshots/TestHandler-common-case=create_clients-case=12-description=empty_ID_succeeds.json index c7518ae416e..dfa8e9641cd 100644 --- a/client/.snapshots/TestHandler-common-case=create_clients-case=12-description=empty_ID_succeeds.json +++ b/client/.snapshots/TestHandler-common-case=create_clients-case=12-description=empty_ID_succeeds.json @@ -1,5 +1,4 @@ { - "client_name": "", "client_secret": "averylongsecret", "redirect_uris": [ "http://localhost:3000/cb" @@ -8,7 +7,6 @@ "response_types": null, "scope": "offline_access offline openid", "audience": [], - "owner": "", "allowed_cors_origins": [], "client_secret_expires_at": 0, "subject_type": "public", diff --git a/client/.snapshots/TestHandler-common-case=create_clients-case=4-description=non-uuid_works.json b/client/.snapshots/TestHandler-common-case=create_clients-case=4-description=non-uuid_works.json index 65cdf186e07..4b80db0a7a7 100644 --- a/client/.snapshots/TestHandler-common-case=create_clients-case=4-description=non-uuid_works.json +++ b/client/.snapshots/TestHandler-common-case=create_clients-case=4-description=non-uuid_works.json @@ -1,6 +1,5 @@ { "client_id": "not-a-uuid", - "client_name": "", "client_secret": "averylongsecret", "redirect_uris": [ "http://localhost:3000/cb" @@ -9,7 +8,6 @@ "response_types": null, "scope": "offline_access offline openid", "audience": [], - "owner": "", "allowed_cors_origins": [], "client_secret_expires_at": 0, "subject_type": "public", diff --git a/client/.snapshots/TestHandler-common-case=create_clients-case=5-description=setting_client_id_as_uuid_works.json b/client/.snapshots/TestHandler-common-case=create_clients-case=5-description=setting_client_id_as_uuid_works.json index 502723e88c3..f03534169e0 100644 --- a/client/.snapshots/TestHandler-common-case=create_clients-case=5-description=setting_client_id_as_uuid_works.json +++ b/client/.snapshots/TestHandler-common-case=create_clients-case=5-description=setting_client_id_as_uuid_works.json @@ -1,6 +1,5 @@ { "client_id": "98941dac-f963-4468-8a23-9483b1e04e3c", - "client_name": "", "client_secret": "not too short", "redirect_uris": [ "http://localhost:3000/cb" @@ -9,7 +8,6 @@ "response_types": null, "scope": "offline_access offline openid", "audience": [], - "owner": "", "allowed_cors_origins": [], "client_secret_expires_at": 0, "subject_type": "public", diff --git a/client/.snapshots/TestHandler-common-case=create_clients-case=8-description=setting_skip_consent_succeeds_for_admin_registration.json b/client/.snapshots/TestHandler-common-case=create_clients-case=8-description=setting_skip_consent_succeeds_for_admin_registration.json index 55030050a10..1f69834ae8e 100644 --- a/client/.snapshots/TestHandler-common-case=create_clients-case=8-description=setting_skip_consent_succeeds_for_admin_registration.json +++ b/client/.snapshots/TestHandler-common-case=create_clients-case=8-description=setting_skip_consent_succeeds_for_admin_registration.json @@ -1,5 +1,4 @@ { - "client_name": "", "client_secret": "2SKZkBf2P5g4toAXXnCrr~_sDM", "redirect_uris": [ "http://localhost:3000/cb" @@ -8,7 +7,6 @@ "response_types": null, "scope": "offline_access offline openid", "audience": [], - "owner": "", "allowed_cors_origins": [], "client_secret_expires_at": 0, "subject_type": "public", diff --git a/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=admin.json b/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=admin.json index 0def2443a9a..36d1b3ce350 100644 --- a/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=admin.json +++ b/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=admin.json @@ -1,6 +1,5 @@ { "body": { - "client_name": "", "redirect_uris": [ "http://localhost:3000/cb" ], @@ -8,7 +7,6 @@ "response_types": [], "scope": "offline_access offline openid", "audience": [], - "owner": "", "allowed_cors_origins": [], "client_secret_expires_at": 0, "subject_type": "public", diff --git a/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=selfservice.json b/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=selfservice.json index 302351a3fa2..4e52d08475d 100644 --- a/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=selfservice.json +++ b/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=selfservice.json @@ -1,6 +1,5 @@ { "body": { - "client_name": "", "redirect_uris": [ "http://localhost:3000/cb" ], @@ -8,7 +7,6 @@ "response_types": [], "scope": "offline_access offline openid", "audience": [], - "owner": "", "allowed_cors_origins": [], "client_secret_expires_at": 0, "subject_type": "public", diff --git a/client/.snapshots/TestHandler-common-case=update_the_lifespans_of_an_OAuth2_client.json b/client/.snapshots/TestHandler-common-case=update_the_lifespans_of_an_OAuth2_client.json index f564e1d0f1e..32121b97bf7 100644 --- a/client/.snapshots/TestHandler-common-case=update_the_lifespans_of_an_OAuth2_client.json +++ b/client/.snapshots/TestHandler-common-case=update_the_lifespans_of_an_OAuth2_client.json @@ -8,7 +8,6 @@ "response_types": [], "scope": "offline_access offline openid", "audience": [], - "owner": "", "allowed_cors_origins": [], "client_secret_expires_at": 0, "subject_type": "public", diff --git a/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=admin.json b/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=admin.json index e7ba1d697f3..d05e5e6f775 100644 --- a/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=admin.json +++ b/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=admin.json @@ -1,6 +1,5 @@ { "body": { - "client_name": "", "client_secret": "averylongsecret", "redirect_uris": [ "http://localhost:3000/cb", @@ -10,7 +9,6 @@ "response_types": null, "scope": "offline_access offline openid", "audience": [], - "owner": "", "allowed_cors_origins": [], "client_secret_expires_at": 0, "subject_type": "public", diff --git a/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=dynamic_client_registration.json b/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=dynamic_client_registration.json index 801de4aa079..fd6cfc9a1cc 100644 --- a/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=dynamic_client_registration.json +++ b/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=dynamic_client_registration.json @@ -1,6 +1,5 @@ { "body": { - "client_name": "", "redirect_uris": [ "http://localhost:3000/cb", "https://foobar.com" @@ -9,7 +8,6 @@ "response_types": null, "scope": "offline_access offline openid", "audience": [], - "owner": "", "allowed_cors_origins": [], "client_secret_expires_at": 0, "subject_type": "public", diff --git a/client/.snapshots/TestHandler-create_client_registration_tokens-case=0-dynamic=true.json b/client/.snapshots/TestHandler-create_client_registration_tokens-case=0-dynamic=true.json index b9bc0125a18..e6057f11454 100644 --- a/client/.snapshots/TestHandler-create_client_registration_tokens-case=0-dynamic=true.json +++ b/client/.snapshots/TestHandler-create_client_registration_tokens-case=0-dynamic=true.json @@ -1,14 +1,10 @@ { - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": [], - "owner": "", "allowed_cors_origins": [], "client_secret_expires_at": 0, - "subject_type": "", "jwks": {}, "metadata": {}, "skip_consent": false, diff --git a/client/.snapshots/TestHandler-create_client_registration_tokens-case=1-dynamic=false.json b/client/.snapshots/TestHandler-create_client_registration_tokens-case=1-dynamic=false.json index b9bc0125a18..e6057f11454 100644 --- a/client/.snapshots/TestHandler-create_client_registration_tokens-case=1-dynamic=false.json +++ b/client/.snapshots/TestHandler-create_client_registration_tokens-case=1-dynamic=false.json @@ -1,14 +1,10 @@ { - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": [], - "owner": "", "allowed_cors_origins": [], "client_secret_expires_at": 0, - "subject_type": "", "jwks": {}, "metadata": {}, "skip_consent": false, diff --git a/client/.snapshots/TestHandler-create_client_registration_tokens-case=2-dynamic=false.json b/client/.snapshots/TestHandler-create_client_registration_tokens-case=2-dynamic=false.json index 694d8b7ac69..e52441f6050 100644 --- a/client/.snapshots/TestHandler-create_client_registration_tokens-case=2-dynamic=false.json +++ b/client/.snapshots/TestHandler-create_client_registration_tokens-case=2-dynamic=false.json @@ -1,15 +1,11 @@ { - "client_name": "", "client_secret": "01bbf13a-ae3e-44d5-b4b4-dd78137041be", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": [], - "owner": "", "allowed_cors_origins": [], "client_secret_expires_at": 0, - "subject_type": "", "jwks": {}, "metadata": {}, "skip_consent": false, diff --git a/client/client.go b/client/client.go index 394b6b569a5..6224c051998 100644 --- a/client/client.go +++ b/client/client.go @@ -43,7 +43,7 @@ type Client struct { // // The human-readable name of the client to be presented to the // end-user during authorization. - Name string `json:"client_name" db:"client_name"` + Name string `json:"client_name,omitempty" db:"client_name"` // OAuth 2.0 Client Secret // @@ -89,7 +89,7 @@ type Client struct { // can use when requesting access tokens. // // Example: scope1 scope-2 scope.3 scope:4 - Scope string `json:"scope" db:"scope"` + Scope string `json:"scope,omitempty" db:"scope"` // OAuth 2.0 Client Audience // @@ -103,7 +103,7 @@ type Client struct { // OAuth 2.0 Client Owner // // Owner is a string identifying the owner of the OAuth 2.0 Client. - Owner string `json:"owner" db:"owner"` + Owner string `json:"owner,omitempty" db:"owner"` // OAuth 2.0 Client Policy URI // @@ -157,7 +157,7 @@ type Client struct { // // The `subject_types_supported` Discovery parameter contains a // list of the supported subject_type values for this server. Valid types include `pairwise` and `public`. - SubjectType string `json:"subject_type" db:"subject_type" faker:"len=15"` + SubjectType string `json:"subject_type,omitempty" db:"subject_type" faker:"len=15"` // OpenID Connect Sector Identifier URI // diff --git a/cmd/.snapshots/TestCreateClient-case=creates_successfully.json b/cmd/.snapshots/TestCreateClient-case=creates_successfully.json index 3bbaae82ed5..0b86bf7bac0 100644 --- a/cmd/.snapshots/TestCreateClient-case=creates_successfully.json +++ b/cmd/.snapshots/TestCreateClient-case=creates_successfully.json @@ -1,12 +1,10 @@ { - "client_name": "", "client_secret_expires_at": 0, "grant_types": [ "authorization_code" ], "jwks": {}, "metadata": {}, - "owner": "", "request_object_signing_alg": "RS256", "response_types": [ "code" diff --git a/cmd/.snapshots/TestCreateClient-case=supports_encryption.json b/cmd/.snapshots/TestCreateClient-case=supports_encryption.json index 020f7b36a0c..27d5ac7d57d 100644 --- a/cmd/.snapshots/TestCreateClient-case=supports_encryption.json +++ b/cmd/.snapshots/TestCreateClient-case=supports_encryption.json @@ -3,7 +3,6 @@ "https://www.ory.sh/audience1", "https://www.ory.sh/audience2" ], - "client_name": "", "client_secret_expires_at": 0, "grant_types": [ "authorization_code" @@ -12,7 +11,6 @@ "metadata": { "foo": "bar" }, - "owner": "", "request_object_signing_alg": "RS256", "response_types": [ "code" diff --git a/cmd/.snapshots/TestCreateClient-case=supports_setting_flags.json b/cmd/.snapshots/TestCreateClient-case=supports_setting_flags.json index 020f7b36a0c..27d5ac7d57d 100644 --- a/cmd/.snapshots/TestCreateClient-case=supports_setting_flags.json +++ b/cmd/.snapshots/TestCreateClient-case=supports_setting_flags.json @@ -3,7 +3,6 @@ "https://www.ory.sh/audience1", "https://www.ory.sh/audience2" ], - "client_name": "", "client_secret_expires_at": 0, "grant_types": [ "authorization_code" @@ -12,7 +11,6 @@ "metadata": { "foo": "bar" }, - "owner": "", "request_object_signing_alg": "RS256", "response_types": [ "code" diff --git a/cmd/.snapshots/TestGetClient-case=gets_client.json b/cmd/.snapshots/TestGetClient-case=gets_client.json index 289fc594102..fd6d6fe7975 100644 --- a/cmd/.snapshots/TestGetClient-case=gets_client.json +++ b/cmd/.snapshots/TestGetClient-case=gets_client.json @@ -1,11 +1,7 @@ { - "client_name": "", "client_secret_expires_at": 0, "jwks": {}, "metadata": {}, - "owner": "", - "scope": "", "skip_consent": false, - "subject_type": "", "token_endpoint_auth_method": "client_secret_post" } diff --git a/cmd/.snapshots/TestGetClient-case=gets_multiple_clients.json b/cmd/.snapshots/TestGetClient-case=gets_multiple_clients.json index 2e6cb04b08b..289a674c2b0 100644 --- a/cmd/.snapshots/TestGetClient-case=gets_multiple_clients.json +++ b/cmd/.snapshots/TestGetClient-case=gets_multiple_clients.json @@ -2,33 +2,25 @@ { "allowed_cors_origins": [], "audience": [], - "client_name": "", "client_secret_expires_at": 0, "grant_types": [], "jwks": {}, "metadata": {}, - "owner": "", "redirect_uris": [], "response_types": [], - "scope": "", "skip_consent": false, - "subject_type": "", "token_endpoint_auth_method": "client_secret_post" }, { "allowed_cors_origins": [], "audience": [], - "client_name": "", "client_secret_expires_at": 0, "grant_types": [], "jwks": {}, "metadata": {}, - "owner": "", "redirect_uris": [], "response_types": [], - "scope": "", "skip_consent": false, - "subject_type": "", "token_endpoint_auth_method": "client_secret_post" } ] diff --git a/cmd/.snapshots/TestImportClient-case=imports_clients_from_single_file.json b/cmd/.snapshots/TestImportClient-case=imports_clients_from_single_file.json index 03bf7479942..5c3543acc7c 100644 --- a/cmd/.snapshots/TestImportClient-case=imports_clients_from_single_file.json +++ b/cmd/.snapshots/TestImportClient-case=imports_clients_from_single_file.json @@ -2,11 +2,9 @@ { "allowed_cors_origins": [], "audience": [], - "client_name": "", "client_secret_expires_at": 0, "jwks": {}, "metadata": {}, - "owner": "", "scope": "foo", "skip_consent": false, "subject_type": "public", @@ -16,11 +14,9 @@ { "allowed_cors_origins": [], "audience": [], - "client_name": "", "client_secret_expires_at": 0, "jwks": {}, "metadata": {}, - "owner": "", "scope": "bar", "skip_consent": false, "subject_type": "public", diff --git a/cmd/.snapshots/TestImportClient-case=performs_appropriate_error_reporting.json b/cmd/.snapshots/TestImportClient-case=performs_appropriate_error_reporting.json index 03bf7479942..5c3543acc7c 100644 --- a/cmd/.snapshots/TestImportClient-case=performs_appropriate_error_reporting.json +++ b/cmd/.snapshots/TestImportClient-case=performs_appropriate_error_reporting.json @@ -2,11 +2,9 @@ { "allowed_cors_origins": [], "audience": [], - "client_name": "", "client_secret_expires_at": 0, "jwks": {}, "metadata": {}, - "owner": "", "scope": "foo", "skip_consent": false, "subject_type": "public", @@ -16,11 +14,9 @@ { "allowed_cors_origins": [], "audience": [], - "client_name": "", "client_secret_expires_at": 0, "jwks": {}, "metadata": {}, - "owner": "", "scope": "bar", "skip_consent": false, "subject_type": "public", diff --git a/cmd/.snapshots/TestUpdateClient-case=creates_successfully.json b/cmd/.snapshots/TestUpdateClient-case=creates_successfully.json index 50424202b65..22da6e92552 100644 --- a/cmd/.snapshots/TestUpdateClient-case=creates_successfully.json +++ b/cmd/.snapshots/TestUpdateClient-case=creates_successfully.json @@ -1,12 +1,10 @@ { - "client_name": "", "client_secret_expires_at": 0, "grant_types": [ "implicit" ], "jwks": {}, "metadata": {}, - "owner": "", "request_object_signing_alg": "RS256", "response_types": [ "code" diff --git a/cmd/.snapshots/TestUpdateClient-case=supports_encryption.json b/cmd/.snapshots/TestUpdateClient-case=supports_encryption.json index 50424202b65..22da6e92552 100644 --- a/cmd/.snapshots/TestUpdateClient-case=supports_encryption.json +++ b/cmd/.snapshots/TestUpdateClient-case=supports_encryption.json @@ -1,12 +1,10 @@ { - "client_name": "", "client_secret_expires_at": 0, "grant_types": [ "implicit" ], "jwks": {}, "metadata": {}, - "owner": "", "request_object_signing_alg": "RS256", "response_types": [ "code" diff --git a/cmd/.snapshots/TestUpdateClient-case=updates_from_file-file=from_disk.json b/cmd/.snapshots/TestUpdateClient-case=updates_from_file-file=from_disk.json index 4ebcc7609a4..136b94745d3 100644 --- a/cmd/.snapshots/TestUpdateClient-case=updates_from_file-file=from_disk.json +++ b/cmd/.snapshots/TestUpdateClient-case=updates_from_file-file=from_disk.json @@ -6,7 +6,6 @@ ], "jwks": {}, "metadata": {}, - "owner": "", "request_object_signing_alg": "RS256", "response_types": [ "code" diff --git a/cmd/.snapshots/TestUpdateClient-case=updates_from_file-file=stdin.json b/cmd/.snapshots/TestUpdateClient-case=updates_from_file-file=stdin.json index 42795829507..8f974edcb99 100644 --- a/cmd/.snapshots/TestUpdateClient-case=updates_from_file-file=stdin.json +++ b/cmd/.snapshots/TestUpdateClient-case=updates_from_file-file=stdin.json @@ -6,7 +6,6 @@ ], "jwks": {}, "metadata": {}, - "owner": "", "request_object_signing_alg": "RS256", "response_types": [ "code" diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-consent_error.json b/flow/.snapshots/TestCanUseLegacyChallenges-consent_error.json index 11abd38d6fd..84a4032d5f2 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-consent_error.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-consent_error.json @@ -26,16 +26,12 @@ }, "c": { "client_id": "a12bf95e-ccfc-45fc-b10d-1358790772c7", - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": null, - "owner": "", "allowed_cors_origins": null, "client_secret_expires_at": 0, - "subject_type": "", "created_at": "0001-01-01T00:00:00Z", "updated_at": "0001-01-01T00:00:00Z", "skip_consent": false, diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-consent_initialized.json b/flow/.snapshots/TestCanUseLegacyChallenges-consent_initialized.json index 7bedc54dc87..8725c45beb4 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-consent_initialized.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-consent_initialized.json @@ -26,16 +26,12 @@ }, "c": { "client_id": "a12bf95e-ccfc-45fc-b10d-1358790772c7", - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": null, - "owner": "", "allowed_cors_origins": null, "client_secret_expires_at": 0, - "subject_type": "", "created_at": "0001-01-01T00:00:00Z", "updated_at": "0001-01-01T00:00:00Z", "skip_consent": false, diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-consent_unused.json b/flow/.snapshots/TestCanUseLegacyChallenges-consent_unused.json index 59234d4023f..2672d031756 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-consent_unused.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-consent_unused.json @@ -26,16 +26,12 @@ }, "c": { "client_id": "a12bf95e-ccfc-45fc-b10d-1358790772c7", - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": null, - "owner": "", "allowed_cors_origins": null, "client_secret_expires_at": 0, - "subject_type": "", "created_at": "0001-01-01T00:00:00Z", "updated_at": "0001-01-01T00:00:00Z", "skip_consent": false, diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-consent_used.json b/flow/.snapshots/TestCanUseLegacyChallenges-consent_used.json index fb66a5c8be2..144a84db2a5 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-consent_used.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-consent_used.json @@ -26,16 +26,12 @@ }, "c": { "client_id": "a12bf95e-ccfc-45fc-b10d-1358790772c7", - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": null, - "owner": "", "allowed_cors_origins": null, "client_secret_expires_at": 0, - "subject_type": "", "created_at": "0001-01-01T00:00:00Z", "updated_at": "0001-01-01T00:00:00Z", "skip_consent": false, diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-device_error.json b/flow/.snapshots/TestCanUseLegacyChallenges-device_error.json index 6f6490400c9..09953f025fe 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-device_error.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-device_error.json @@ -26,16 +26,12 @@ }, "c": { "client_id": "a12bf95e-ccfc-45fc-b10d-1358790772c7", - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": null, - "owner": "", "allowed_cors_origins": null, "client_secret_expires_at": 0, - "subject_type": "", "created_at": "0001-01-01T00:00:00Z", "updated_at": "0001-01-01T00:00:00Z", "skip_consent": false, diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-device_initialized.json b/flow/.snapshots/TestCanUseLegacyChallenges-device_initialized.json index 8c1e2a5d363..9989aa01417 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-device_initialized.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-device_initialized.json @@ -26,16 +26,12 @@ }, "c": { "client_id": "a12bf95e-ccfc-45fc-b10d-1358790772c7", - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": null, - "owner": "", "allowed_cors_origins": null, "client_secret_expires_at": 0, - "subject_type": "", "created_at": "0001-01-01T00:00:00Z", "updated_at": "0001-01-01T00:00:00Z", "skip_consent": false, diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-device_unused.json b/flow/.snapshots/TestCanUseLegacyChallenges-device_unused.json index 63da69fe6a3..89e5140660c 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-device_unused.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-device_unused.json @@ -26,16 +26,12 @@ }, "c": { "client_id": "a12bf95e-ccfc-45fc-b10d-1358790772c7", - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": null, - "owner": "", "allowed_cors_origins": null, "client_secret_expires_at": 0, - "subject_type": "", "created_at": "0001-01-01T00:00:00Z", "updated_at": "0001-01-01T00:00:00Z", "skip_consent": false, diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-device_used.json b/flow/.snapshots/TestCanUseLegacyChallenges-device_used.json index 6ff2609e05f..f93d753424d 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-device_used.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-device_used.json @@ -26,16 +26,12 @@ }, "c": { "client_id": "a12bf95e-ccfc-45fc-b10d-1358790772c7", - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": null, - "owner": "", "allowed_cors_origins": null, "client_secret_expires_at": 0, - "subject_type": "", "created_at": "0001-01-01T00:00:00Z", "updated_at": "0001-01-01T00:00:00Z", "skip_consent": false, diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-login_error.json b/flow/.snapshots/TestCanUseLegacyChallenges-login_error.json index d63f6216d97..bc191ad2d72 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-login_error.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-login_error.json @@ -26,16 +26,12 @@ }, "c": { "client_id": "a12bf95e-ccfc-45fc-b10d-1358790772c7", - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": null, - "owner": "", "allowed_cors_origins": null, "client_secret_expires_at": 0, - "subject_type": "", "created_at": "0001-01-01T00:00:00Z", "updated_at": "0001-01-01T00:00:00Z", "skip_consent": false, diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-login_initialized.json b/flow/.snapshots/TestCanUseLegacyChallenges-login_initialized.json index 7ecab04857f..57bb9e50e02 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-login_initialized.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-login_initialized.json @@ -26,16 +26,12 @@ }, "c": { "client_id": "a12bf95e-ccfc-45fc-b10d-1358790772c7", - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": null, - "owner": "", "allowed_cors_origins": null, "client_secret_expires_at": 0, - "subject_type": "", "created_at": "0001-01-01T00:00:00Z", "updated_at": "0001-01-01T00:00:00Z", "skip_consent": false, diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-login_unused.json b/flow/.snapshots/TestCanUseLegacyChallenges-login_unused.json index a6a89e8e185..3db829febae 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-login_unused.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-login_unused.json @@ -26,16 +26,12 @@ }, "c": { "client_id": "a12bf95e-ccfc-45fc-b10d-1358790772c7", - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": null, - "owner": "", "allowed_cors_origins": null, "client_secret_expires_at": 0, - "subject_type": "", "created_at": "0001-01-01T00:00:00Z", "updated_at": "0001-01-01T00:00:00Z", "skip_consent": false, diff --git a/flow/.snapshots/TestCanUseLegacyChallenges-login_used.json b/flow/.snapshots/TestCanUseLegacyChallenges-login_used.json index c649423d0ac..99a25e9aeb7 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-login_used.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-login_used.json @@ -26,16 +26,12 @@ }, "c": { "client_id": "a12bf95e-ccfc-45fc-b10d-1358790772c7", - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": null, - "owner": "", "allowed_cors_origins": null, "client_secret_expires_at": 0, - "subject_type": "", "created_at": "0001-01-01T00:00:00Z", "updated_at": "0001-01-01T00:00:00Z", "skip_consent": false, diff --git a/flow/.snapshots/TestDecodeAndInvalidateConsentVerifier-case=successful_decode_and_invalidate_with_valid_consent_verifier.json b/flow/.snapshots/TestDecodeAndInvalidateConsentVerifier-case=successful_decode_and_invalidate_with_valid_consent_verifier.json index a65338d88a0..12e1ebef523 100644 --- a/flow/.snapshots/TestDecodeAndInvalidateConsentVerifier-case=successful_decode_and_invalidate_with_valid_consent_verifier.json +++ b/flow/.snapshots/TestDecodeAndInvalidateConsentVerifier-case=successful_decode_and_invalidate_with_valid_consent_verifier.json @@ -25,16 +25,12 @@ }, "c": { "client_id": "a12bf95e-ccfc-45fc-b10d-1358790772c7", - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": null, - "owner": "", "allowed_cors_origins": null, "client_secret_expires_at": 0, - "subject_type": "", "created_at": "0001-01-01T00:00:00Z", "updated_at": "0001-01-01T00:00:00Z", "skip_consent": false, diff --git a/flow/.snapshots/TestDecodeAndInvalidateDeviceVerifier-case=successful_decode_and_invalidate_with_valid_device_verifier.json b/flow/.snapshots/TestDecodeAndInvalidateDeviceVerifier-case=successful_decode_and_invalidate_with_valid_device_verifier.json index 264655f5395..bfb91f14763 100644 --- a/flow/.snapshots/TestDecodeAndInvalidateDeviceVerifier-case=successful_decode_and_invalidate_with_valid_device_verifier.json +++ b/flow/.snapshots/TestDecodeAndInvalidateDeviceVerifier-case=successful_decode_and_invalidate_with_valid_device_verifier.json @@ -25,16 +25,12 @@ }, "c": { "client_id": "a12bf95e-ccfc-45fc-b10d-1358790772c7", - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": null, - "owner": "", "allowed_cors_origins": null, "client_secret_expires_at": 0, - "subject_type": "", "created_at": "0001-01-01T00:00:00Z", "updated_at": "0001-01-01T00:00:00Z", "skip_consent": false, diff --git a/flow/.snapshots/TestDecodeAndInvalidateLoginVerifier-case=successful_decode_and_invalidate_with_valid_login_verifier.json b/flow/.snapshots/TestDecodeAndInvalidateLoginVerifier-case=successful_decode_and_invalidate_with_valid_login_verifier.json index b7464797a81..e000de8c071 100644 --- a/flow/.snapshots/TestDecodeAndInvalidateLoginVerifier-case=successful_decode_and_invalidate_with_valid_login_verifier.json +++ b/flow/.snapshots/TestDecodeAndInvalidateLoginVerifier-case=successful_decode_and_invalidate_with_valid_login_verifier.json @@ -25,16 +25,12 @@ }, "c": { "client_id": "a12bf95e-ccfc-45fc-b10d-1358790772c7", - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": null, - "owner": "", "allowed_cors_origins": null, "client_secret_expires_at": 0, - "subject_type": "", "created_at": "0001-01-01T00:00:00Z", "updated_at": "0001-01-01T00:00:00Z", "skip_consent": false, diff --git a/flow/.snapshots/TestDecodeFromConsentChallenge-case=successful_decode_with_valid_consent_challenge.json b/flow/.snapshots/TestDecodeFromConsentChallenge-case=successful_decode_with_valid_consent_challenge.json index 1cfffdd44f9..db0a83ac559 100644 --- a/flow/.snapshots/TestDecodeFromConsentChallenge-case=successful_decode_with_valid_consent_challenge.json +++ b/flow/.snapshots/TestDecodeFromConsentChallenge-case=successful_decode_with_valid_consent_challenge.json @@ -25,16 +25,12 @@ }, "c": { "client_id": "a12bf95e-ccfc-45fc-b10d-1358790772c7", - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": null, - "owner": "", "allowed_cors_origins": null, "client_secret_expires_at": 0, - "subject_type": "", "created_at": "0001-01-01T00:00:00Z", "updated_at": "0001-01-01T00:00:00Z", "skip_consent": false, diff --git a/flow/.snapshots/TestDecodeFromDeviceChallenge-case=successful_decode_with_valid_device_challenge.json b/flow/.snapshots/TestDecodeFromDeviceChallenge-case=successful_decode_with_valid_device_challenge.json index 92728f9ba40..cf13bc597e2 100644 --- a/flow/.snapshots/TestDecodeFromDeviceChallenge-case=successful_decode_with_valid_device_challenge.json +++ b/flow/.snapshots/TestDecodeFromDeviceChallenge-case=successful_decode_with_valid_device_challenge.json @@ -25,16 +25,12 @@ }, "c": { "client_id": "a12bf95e-ccfc-45fc-b10d-1358790772c7", - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": null, - "owner": "", "allowed_cors_origins": null, "client_secret_expires_at": 0, - "subject_type": "", "created_at": "0001-01-01T00:00:00Z", "updated_at": "0001-01-01T00:00:00Z", "skip_consent": false, diff --git a/flow/.snapshots/TestDecodeFromLoginChallenge-case=successful_decode_with_valid_login_challenge.json b/flow/.snapshots/TestDecodeFromLoginChallenge-case=successful_decode_with_valid_login_challenge.json index 63c66e791fb..4812463eb42 100644 --- a/flow/.snapshots/TestDecodeFromLoginChallenge-case=successful_decode_with_valid_login_challenge.json +++ b/flow/.snapshots/TestDecodeFromLoginChallenge-case=successful_decode_with_valid_login_challenge.json @@ -25,16 +25,12 @@ }, "c": { "client_id": "a12bf95e-ccfc-45fc-b10d-1358790772c7", - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": null, - "owner": "", "allowed_cors_origins": null, "client_secret_expires_at": 0, - "subject_type": "", "created_at": "0001-01-01T00:00:00Z", "updated_at": "0001-01-01T00:00:00Z", "skip_consent": false, diff --git a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_consent_request.json b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_consent_request.json index ec9beca1714..c2c59099b27 100644 --- a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_consent_request.json +++ b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_consent_request.json @@ -12,7 +12,6 @@ "audience-2" ], "client_id": "64f78bf1-f388-4eeb-9fee-e7207226c6be-jwt", - "client_name": "", "client_secret_expires_at": 0, "grant_types": [ "implicit", @@ -23,7 +22,6 @@ ], "jwks": {}, "metadata": {}, - "owner": "", "redirect_uris": [ "https://client.ory/callback" ], @@ -33,8 +31,7 @@ "token" ], "scope": "hydra offline openid", - "skip_consent": false, - "subject_type": "" + "skip_consent": false }, "oidc_context": {}, "requested_access_token_audience": [], diff --git a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_login_request.json b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_login_request.json index da18bc7c779..001a9bf98db 100644 --- a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_login_request.json +++ b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=jwt-access_and_id_tokens_with_extra_claims_login_request.json @@ -7,7 +7,6 @@ "audience-2" ], "client_id": "64f78bf1-f388-4eeb-9fee-e7207226c6be-jwt", - "client_name": "", "client_secret_expires_at": 0, "grant_types": [ "implicit", @@ -18,7 +17,6 @@ ], "jwks": {}, "metadata": {}, - "owner": "", "redirect_uris": [ "https://client.ory/callback" ], @@ -28,8 +26,7 @@ "token" ], "scope": "hydra offline openid", - "skip_consent": false, - "subject_type": "" + "skip_consent": false }, "oidc_context": {}, "requested_access_token_audience": [], diff --git a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_consent_request.json b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_consent_request.json index c61d28cb5fd..ecec8b9f8f5 100644 --- a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_consent_request.json +++ b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_consent_request.json @@ -12,7 +12,6 @@ "audience-2" ], "client_id": "64f78bf1-f388-4eeb-9fee-e7207226c6be-opaque", - "client_name": "", "client_secret_expires_at": 0, "grant_types": [ "implicit", @@ -23,7 +22,6 @@ ], "jwks": {}, "metadata": {}, - "owner": "", "redirect_uris": [ "https://client.ory/callback" ], @@ -33,8 +31,7 @@ "token" ], "scope": "hydra offline openid", - "skip_consent": false, - "subject_type": "" + "skip_consent": false }, "oidc_context": {}, "requested_access_token_audience": [], diff --git a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_login_request.json b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_login_request.json index 14a33f61ad7..fd9928ad1da 100644 --- a/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_login_request.json +++ b/oauth2/.snapshots/TestAuthCodeFlowE2E-auth_code_flow-strategy=opaque-access_and_id_tokens_with_extra_claims_login_request.json @@ -7,7 +7,6 @@ "audience-2" ], "client_id": "64f78bf1-f388-4eeb-9fee-e7207226c6be-opaque", - "client_name": "", "client_secret_expires_at": 0, "grant_types": [ "implicit", @@ -18,7 +17,6 @@ ], "jwks": {}, "metadata": {}, - "owner": "", "redirect_uris": [ "https://client.ory/callback" ], @@ -28,8 +26,7 @@ "token" ], "scope": "hydra offline openid", - "skip_consent": false, - "subject_type": "" + "skip_consent": false }, "oidc_context": {}, "requested_access_token_audience": [], diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=legacy.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=legacy.json index b21a79b621d..fb3fdd3ad83 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=legacy.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=legacy.json @@ -19,8 +19,7 @@ } }, "headers": { - "extra": { - } + "extra": {} }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=new.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=new.json index 3ebfb438e65..fa0eaf5ec6c 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=new.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=new.json @@ -18,8 +18,7 @@ } }, "headers": { - "extra": { - } + "extra": {} }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=legacy.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=legacy.json index b21a79b621d..fb3fdd3ad83 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=legacy.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=legacy.json @@ -19,8 +19,7 @@ } }, "headers": { - "extra": { - } + "extra": {} }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=new.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=new.json index 3ebfb438e65..fa0eaf5ec6c 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=new.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=new.json @@ -18,8 +18,7 @@ } }, "headers": { - "extra": { - } + "extra": {} }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=legacy.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=legacy.json index b21a79b621d..fb3fdd3ad83 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=legacy.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=legacy.json @@ -19,8 +19,7 @@ } }, "headers": { - "extra": { - } + "extra": {} }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=new.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=new.json index 3ebfb438e65..fa0eaf5ec6c 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=new.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=new.json @@ -18,8 +18,7 @@ } }, "headers": { - "extra": { - } + "extra": {} }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=legacy.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=legacy.json index b21a79b621d..fb3fdd3ad83 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=legacy.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=legacy.json @@ -19,8 +19,7 @@ } }, "headers": { - "extra": { - } + "extra": {} }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=new.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=new.json index 3ebfb438e65..fa0eaf5ec6c 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=new.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=new.json @@ -18,8 +18,7 @@ } }, "headers": { - "extra": { - } + "extra": {} }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=legacy.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=legacy.json index b21a79b621d..fb3fdd3ad83 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=legacy.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=legacy.json @@ -19,8 +19,7 @@ } }, "headers": { - "extra": { - } + "extra": {} }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=new.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=new.json index 3ebfb438e65..fa0eaf5ec6c 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=new.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=new.json @@ -18,8 +18,7 @@ } }, "headers": { - "extra": { - } + "extra": {} }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=legacy.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=legacy.json index b21a79b621d..fb3fdd3ad83 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=legacy.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=legacy.json @@ -19,8 +19,7 @@ } }, "headers": { - "extra": { - } + "extra": {} }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=new.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=new.json index 3ebfb438e65..fa0eaf5ec6c 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=new.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=new.json @@ -18,8 +18,7 @@ } }, "headers": { - "extra": { - } + "extra": {} }, "subject": "foo" }, From b74c70698eafa0d7420eb6becdc4f5499bb64261 Mon Sep 17 00:00:00 2001 From: Jonathan Reyes Date: Thu, 11 Dec 2025 14:29:48 -0700 Subject: [PATCH 4/4] fix: update oauth2 snapshots to match test output format The snapshot files need to have multi-line empty object format ("extra": {\n}) to match the actual test output. --- ...ould_call_refresh_token_hook_if_configured-hook=legacy.json | 3 ++- ...-should_call_refresh_token_hook_if_configured-hook=new.json | 3 ++- ...ould_call_refresh_token_hook_if_configured-hook=legacy.json | 3 ++- ...-should_call_refresh_token_hook_if_configured-hook=new.json | 3 ++- ...ould_call_refresh_token_hook_if_configured-hook=legacy.json | 3 ++- ...-should_call_refresh_token_hook_if_configured-hook=new.json | 3 ++- ...ould_call_refresh_token_hook_if_configured-hook=legacy.json | 3 ++- ...-should_call_refresh_token_hook_if_configured-hook=new.json | 3 ++- ...ould_call_refresh_token_hook_if_configured-hook=legacy.json | 3 ++- ...-should_call_refresh_token_hook_if_configured-hook=new.json | 3 ++- ...ould_call_refresh_token_hook_if_configured-hook=legacy.json | 3 ++- ...-should_call_refresh_token_hook_if_configured-hook=new.json | 3 ++- 12 files changed, 24 insertions(+), 12 deletions(-) diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=legacy.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=legacy.json index fb3fdd3ad83..b21a79b621d 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=legacy.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=legacy.json @@ -19,7 +19,8 @@ } }, "headers": { - "extra": {} + "extra": { + } }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=new.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=new.json index fa0eaf5ec6c..3ebfb438e65 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=new.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=new.json @@ -18,7 +18,8 @@ } }, "headers": { - "extra": {} + "extra": { + } }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=legacy.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=legacy.json index fb3fdd3ad83..b21a79b621d 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=legacy.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=legacy.json @@ -19,7 +19,8 @@ } }, "headers": { - "extra": {} + "extra": { + } }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=new.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=new.json index fa0eaf5ec6c..3ebfb438e65 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=new.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=new.json @@ -18,7 +18,8 @@ } }, "headers": { - "extra": {} + "extra": { + } }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=legacy.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=legacy.json index fb3fdd3ad83..b21a79b621d 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=legacy.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=legacy.json @@ -19,7 +19,8 @@ } }, "headers": { - "extra": {} + "extra": { + } }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=new.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=new.json index fa0eaf5ec6c..3ebfb438e65 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=new.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=new.json @@ -18,7 +18,8 @@ } }, "headers": { - "extra": {} + "extra": { + } }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=legacy.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=legacy.json index fb3fdd3ad83..b21a79b621d 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=legacy.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=legacy.json @@ -19,7 +19,8 @@ } }, "headers": { - "extra": {} + "extra": { + } }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=new.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=new.json index fa0eaf5ec6c..3ebfb438e65 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=new.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=0-description=should_pass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=new.json @@ -18,7 +18,8 @@ } }, "headers": { - "extra": {} + "extra": { + } }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=legacy.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=legacy.json index fb3fdd3ad83..b21a79b621d 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=legacy.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=legacy.json @@ -19,7 +19,8 @@ } }, "headers": { - "extra": {} + "extra": { + } }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=new.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=new.json index fa0eaf5ec6c..3ebfb438e65 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=new.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=2-description=should_pass_because_prompt=none_and_max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=new.json @@ -18,7 +18,8 @@ } }, "headers": { - "extra": {} + "extra": { + } }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=legacy.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=legacy.json index fb3fdd3ad83..b21a79b621d 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=legacy.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=legacy.json @@ -19,7 +19,8 @@ } }, "headers": { - "extra": {} + "extra": { + } }, "subject": "foo" }, diff --git a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=new.json b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=new.json index fa0eaf5ec6c..3ebfb438e65 100644 --- a/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=new.json +++ b/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=5-description=should_pass_with_prompt=login_when_authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=new.json @@ -18,7 +18,8 @@ } }, "headers": { - "extra": {} + "extra": { + } }, "subject": "foo" },