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..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,13 +6,7 @@ "response_types": null, "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..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,13 +7,7 @@ "response_types": null, "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..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,13 +7,7 @@ "response_types": null, "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..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,13 +7,7 @@ "response_types": null, "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..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,13 +8,7 @@ "response_types": null, "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..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,13 +8,7 @@ "response_types": null, "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..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,13 +7,7 @@ "response_types": null, "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..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,13 +7,7 @@ "response_types": [], "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", "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 d6544830e52..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,13 +7,7 @@ "response_types": [], "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", "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 aca2c7bbca9..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,13 +8,7 @@ "response_types": [], "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", "jwks": {}, 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..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,13 +9,7 @@ "response_types": null, "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..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,13 +8,7 @@ "response_types": null, "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..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,19 +1,10 @@ { - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": [], - "owner": "", - "policy_uri": "", "allowed_cors_origins": [], - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "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 b161bf055fa..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,19 +1,10 @@ { - "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": [], - "owner": "", - "policy_uri": "", "allowed_cors_origins": [], - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "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 aa0b8b3ae78..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,20 +1,11 @@ { - "client_name": "", "client_secret": "01bbf13a-ae3e-44d5-b4b4-dd78137041be", "redirect_uris": null, "grant_types": null, "response_types": null, - "scope": "", "audience": [], - "owner": "", - "policy_uri": "", "allowed_cors_origins": [], - "tos_uri": "", - "client_uri": "", - "logo_uri": "", - "contacts": null, "client_secret_expires_at": 0, - "subject_type": "", "jwks": {}, "metadata": {}, "skip_consent": false, diff --git a/client/client.go b/client/client.go index 38ab42bd9ae..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,14 +103,14 @@ 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 // // 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 // @@ -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/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..0b86bf7bac0 100644 --- a/cmd/.snapshots/TestCreateClient-case=creates_successfully.json +++ b/cmd/.snapshots/TestCreateClient-case=creates_successfully.json @@ -1,15 +1,10 @@ { - "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 +14,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..27d5ac7d57d 100644 --- a/cmd/.snapshots/TestCreateClient-case=supports_encryption.json +++ b/cmd/.snapshots/TestCreateClient-case=supports_encryption.json @@ -3,19 +3,14 @@ "https://www.ory.sh/audience1", "https://www.ory.sh/audience2" ], - "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 +20,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..27d5ac7d57d 100644 --- a/cmd/.snapshots/TestCreateClient-case=supports_setting_flags.json +++ b/cmd/.snapshots/TestCreateClient-case=supports_setting_flags.json @@ -3,19 +3,14 @@ "https://www.ory.sh/audience1", "https://www.ory.sh/audience2" ], - "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 +20,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..fd6d6fe7975 100644 --- a/cmd/.snapshots/TestGetClient-case=gets_client.json +++ b/cmd/.snapshots/TestGetClient-case=gets_client.json @@ -1,15 +1,7 @@ { - "client_name": "", "client_secret_expires_at": 0, - "client_uri": "", "jwks": {}, - "logo_uri": "", "metadata": {}, - "owner": "", - "policy_uri": "", - "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 1685a7ccfd8..289a674c2b0 100644 --- a/cmd/.snapshots/TestGetClient-case=gets_multiple_clients.json +++ b/cmd/.snapshots/TestGetClient-case=gets_multiple_clients.json @@ -2,43 +2,25 @@ { "allowed_cors_origins": [], "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": "", "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, - "client_uri": "", - "contacts": [], "grant_types": [], "jwks": {}, - "logo_uri": "", "metadata": {}, - "owner": "", - "policy_uri": "", "redirect_uris": [], "response_types": [], - "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/TestImportClient-case=imports_clients_from_single_file.json b/cmd/.snapshots/TestImportClient-case=imports_clients_from_single_file.json index 6ca11ca6230..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,37 +2,25 @@ { "allowed_cors_origins": [], "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" }, { "allowed_cors_origins": [], "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..5c3543acc7c 100644 --- a/cmd/.snapshots/TestImportClient-case=performs_appropriate_error_reporting.json +++ b/cmd/.snapshots/TestImportClient-case=performs_appropriate_error_reporting.json @@ -2,37 +2,25 @@ { "allowed_cors_origins": [], "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" }, { "allowed_cors_origins": [], "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..22da6e92552 100644 --- a/cmd/.snapshots/TestUpdateClient-case=creates_successfully.json +++ b/cmd/.snapshots/TestUpdateClient-case=creates_successfully.json @@ -1,15 +1,10 @@ { - "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 +14,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..22da6e92552 100644 --- a/cmd/.snapshots/TestUpdateClient-case=supports_encryption.json +++ b/cmd/.snapshots/TestUpdateClient-case=supports_encryption.json @@ -1,15 +1,10 @@ { - "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 +14,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..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 @@ -1,15 +1,11 @@ { "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 +15,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..8f974edcb99 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,11 @@ { "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 +15,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..84a4032d5f2 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-consent_error.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-consent_error.json @@ -26,21 +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": "", - "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", "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 9097751407c..8725c45beb4 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-consent_initialized.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-consent_initialized.json @@ -26,21 +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": "", - "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", "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 75fe0582431..2672d031756 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-consent_unused.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-consent_unused.json @@ -26,21 +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": "", - "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", "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 1fc76cf601b..144a84db2a5 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-consent_used.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-consent_used.json @@ -26,21 +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": "", - "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", "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 a7eaa304869..09953f025fe 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-device_error.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-device_error.json @@ -26,21 +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": "", - "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", "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 15cf9775ec7..9989aa01417 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-device_initialized.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-device_initialized.json @@ -26,21 +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": "", - "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", "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 fabc7a90ee1..89e5140660c 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-device_unused.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-device_unused.json @@ -26,21 +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": "", - "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", "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 b4df2d3d653..f93d753424d 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-device_used.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-device_used.json @@ -26,21 +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": "", - "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", "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 fea668a491d..bc191ad2d72 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-login_error.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-login_error.json @@ -26,21 +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": "", - "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", "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 3ce62ac6540..57bb9e50e02 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-login_initialized.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-login_initialized.json @@ -26,21 +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": "", - "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", "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 085831bef1b..3db829febae 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-login_unused.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-login_unused.json @@ -26,21 +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": "", - "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", "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 d16752162b8..99a25e9aeb7 100644 --- a/flow/.snapshots/TestCanUseLegacyChallenges-login_used.json +++ b/flow/.snapshots/TestCanUseLegacyChallenges-login_used.json @@ -26,21 +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": "", - "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", "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 883f64f54c2..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,21 +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": "", - "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", "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 7ca27b794ab..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,21 +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": "", - "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", "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 6fe30db4a2d..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,21 +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": "", - "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", "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 6bab0bdd3ef..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,21 +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": "", - "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", "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 3a8753db1ae..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,21 +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": "", - "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", "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 d7f2dcf4e04..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,21 +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": "", - "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", "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 149180ca51d..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,10 +12,7 @@ "audience-2" ], "client_id": "64f78bf1-f388-4eeb-9fee-e7207226c6be-jwt", - "client_name": "", "client_secret_expires_at": 0, - "client_uri": "", - "contacts": [], "grant_types": [ "implicit", "refresh_token", @@ -24,10 +21,7 @@ "client_credentials" ], "jwks": {}, - "logo_uri": "", "metadata": {}, - "owner": "", - "policy_uri": "", "redirect_uris": [ "https://client.ory/callback" ], @@ -37,9 +31,7 @@ "token" ], "scope": "hydra offline openid", - "skip_consent": false, - "subject_type": "", - "tos_uri": "" + "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 e823adef92b..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,10 +7,7 @@ "audience-2" ], "client_id": "64f78bf1-f388-4eeb-9fee-e7207226c6be-jwt", - "client_name": "", "client_secret_expires_at": 0, - "client_uri": "", - "contacts": [], "grant_types": [ "implicit", "refresh_token", @@ -19,10 +16,7 @@ "client_credentials" ], "jwks": {}, - "logo_uri": "", "metadata": {}, - "owner": "", - "policy_uri": "", "redirect_uris": [ "https://client.ory/callback" ], @@ -32,9 +26,7 @@ "token" ], "scope": "hydra offline openid", - "skip_consent": false, - "subject_type": "", - "tos_uri": "" + "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 f297515a26f..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,10 +12,7 @@ "audience-2" ], "client_id": "64f78bf1-f388-4eeb-9fee-e7207226c6be-opaque", - "client_name": "", "client_secret_expires_at": 0, - "client_uri": "", - "contacts": [], "grant_types": [ "implicit", "refresh_token", @@ -24,10 +21,7 @@ "client_credentials" ], "jwks": {}, - "logo_uri": "", "metadata": {}, - "owner": "", - "policy_uri": "", "redirect_uris": [ "https://client.ory/callback" ], @@ -37,9 +31,7 @@ "token" ], "scope": "hydra offline openid", - "skip_consent": false, - "subject_type": "", - "tos_uri": "" + "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 6e18cae17b0..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,10 +7,7 @@ "audience-2" ], "client_id": "64f78bf1-f388-4eeb-9fee-e7207226c6be-opaque", - "client_name": "", "client_secret_expires_at": 0, - "client_uri": "", - "contacts": [], "grant_types": [ "implicit", "refresh_token", @@ -19,10 +16,7 @@ "client_credentials" ], "jwks": {}, - "logo_uri": "", "metadata": {}, - "owner": "", - "policy_uri": "", "redirect_uris": [ "https://client.ory/callback" ], @@ -32,9 +26,7 @@ "token" ], "scope": "hydra offline openid", - "skip_consent": false, - "subject_type": "", - "tos_uri": "" + "skip_consent": false }, "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 (