From cbaf973ed15bb02dab1f6bb3bf58f87788072797 Mon Sep 17 00:00:00 2001 From: Rajat Bajaj Date: Sun, 3 Nov 2024 16:59:33 +0530 Subject: [PATCH] SSO v2 updates --- management/self_service_profiles.go | 43 +++++- management/self_service_profiles_test.go | 23 ++- .../TestSelfServiceProfileManager_Create.yaml | 26 ++-- ...elfServiceProfileManager_CreateTicket.yaml | 56 +++---- .../TestSelfServiceProfileManager_Delete.yaml | 32 ++-- .../TestSelfServiceProfileManager_List.yaml | 24 +-- .../TestSelfServiceProfileManager_Read.yaml | 26 ++-- ...erviceProfileManager_SetGetCustomText.yaml | 145 ++++++++++++++++++ .../TestSelfServiceProfileManager_Update.yaml | 26 ++-- 9 files changed, 299 insertions(+), 102 deletions(-) create mode 100644 test/data/recordings/TestSelfServiceProfileManager_SetGetCustomText.yaml diff --git a/management/self_service_profiles.go b/management/self_service_profiles.go index adeb1cd1..6ef772d5 100644 --- a/management/self_service_profiles.go +++ b/management/self_service_profiles.go @@ -12,6 +12,15 @@ import ( type SelfServiceProfile struct { ID *string `json:"id,omitempty"` + // The name of the self-service Profile + Name *string `json:"name,omitempty"` + // The description of the self-service Profile. + Description *string `json:"description,omitempty"` + + // List of IdP strategies that will be shown to users during the Self-Service SSO flow. + // Possible values: [oidc, samlp, waad, google-apps, adfs, okta, keycloak-samlp] + AllowedStrategies []*string `json:"allowed_strategies,omitempty"` + // List of attributes to be mapped that // will be shown to the user during the SS-SSO flow. UserAttributes []*SelfServiceProfileUserAttributes `json:"user_attributes,omitempty"` @@ -34,6 +43,12 @@ type SelfServiceProfileUserAttributes struct { IsOptional *bool `json:"is_optional"` } +// SelfServiceProfileList is a list of SelfServiceProfiles. +type SelfServiceProfileList struct { + List + SelfServiceProfile []*SelfServiceProfile `json:"self_service_profiles"` +} + // SelfServiceProfileTicket is used to created self-service ticket for a set of clients and organizations. type SelfServiceProfileTicket struct { // If provided, this will allow editing of the @@ -72,13 +87,19 @@ type SelfServiceProfileTicketEnabledOrganizations struct { // MarshalJSON implements the json.Marshaller interface. func (ssp *SelfServiceProfile) MarshalJSON() ([]byte, error) { type SelfServiceProfileSubset struct { - UserAttributes []*SelfServiceProfileUserAttributes `json:"user_attributes,omitempty"` - Branding *Branding `json:"branding,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + AllowedStrategies []*string `json:"allowed_strategies,omitempty"` + UserAttributes []*SelfServiceProfileUserAttributes `json:"user_attributes,omitempty"` + Branding *Branding `json:"branding,omitempty"` } return json.Marshal(&SelfServiceProfileSubset{ - UserAttributes: ssp.UserAttributes, - Branding: ssp.Branding, + Name: ssp.Name, + Description: ssp.Description, + AllowedStrategies: ssp.AllowedStrategies, + UserAttributes: ssp.UserAttributes, + Branding: ssp.Branding, }) } @@ -92,7 +113,7 @@ func (m *SelfServiceProfileManager) Create(ctx context.Context, s *SelfServicePr } // List all Self Service Profiles. -func (m *SelfServiceProfileManager) List(ctx context.Context, opts ...RequestOption) (s []*SelfServiceProfile, err error) { +func (m *SelfServiceProfileManager) List(ctx context.Context, opts ...RequestOption) (s *SelfServiceProfileList, err error) { err = m.management.Request(ctx, "GET", m.management.URI("self-service-profiles"), &s, applyListDefaults(opts)) return } @@ -113,6 +134,18 @@ func (m *SelfServiceProfileManager) Delete(ctx context.Context, id string, opts return m.management.Request(ctx, "DELETE", m.management.URI("self-service-profiles", id), nil, opts...) } +// GetCustomText retrieves text customizations for a given self-service profile, language and Self Service SSO Flow page. +func (m *SelfServiceProfileManager) GetCustomText(ctx context.Context, id string, language string, page string, opts ...RequestOption) (payload map[string]interface{}, err error) { + err = m.management.Request(ctx, "GET", m.management.URI("self-service-profiles", id, "custom-text", language, page), &payload, opts...) + return +} + +// SetCustomText updates text customizations for a given self-service profile, language and Self Service SSO Flow page. +func (m *SelfServiceProfileManager) SetCustomText(ctx context.Context, id string, language string, page string, payload map[string]interface{}, opts ...RequestOption) (err error) { + err = m.management.Request(ctx, "PUT", m.management.URI("self-service-profiles", id, "custom-text", language, page), payload, opts...) + return +} + // CreateTicket creates a sso-access ticket to initiate the Self Service SSO Flow. func (m *SelfServiceProfileManager) CreateTicket(ctx context.Context, id string, t *SelfServiceProfileTicket, opts ...RequestOption) (err error) { err = m.management.Request(ctx, "POST", m.management.URI("self-service-profiles", id, "sso-ticket"), t, opts...) diff --git a/management/self_service_profiles_test.go b/management/self_service_profiles_test.go index 12cbe935..d35c02b7 100644 --- a/management/self_service_profiles_test.go +++ b/management/self_service_profiles_test.go @@ -15,6 +15,9 @@ import ( func TestSelfServiceProfileManager_Create(t *testing.T) { configureHTTPTestRecordings(t) ssop := &SelfServiceProfile{ + Name: auth0.String("Sample Self Service Profile"), + Description: auth0.String("Sample Desc"), + AllowedStrategies: []*string{auth0.String("oidc")}, Branding: &Branding{ LogoURL: auth0.String("https://example.com/logo.png"), Colors: &BrandingColors{ @@ -45,8 +48,8 @@ func TestSelfServiceProfileManager_List(t *testing.T) { ssop := givenASelfServiceProfile(t) ssopList, err := api.SelfServiceProfile.List(context.Background()) assert.NoError(t, err) - assert.Greater(t, len(ssopList), 0) - assert.Contains(t, ssopList, ssop) + assert.Greater(t, len(ssopList.SelfServiceProfile), 0) + assert.Contains(t, ssopList.SelfServiceProfile, ssop) } func TestSelfServiceProfileManager_Read(t *testing.T) { @@ -92,6 +95,19 @@ func TestSelfServiceProfileManager_Delete(t *testing.T) { assert.Equal(t, http.StatusNotFound, err.(Error).Status()) } +func TestSelfServiceProfileManager_SetGetCustomText(t *testing.T) { + configureHTTPTestRecordings(t) + ssop := givenASelfServiceProfile(t) + payload := map[string]interface{}{ + "introduction": "\"Welcome! With only a few steps you'll be able to setup your new connection.\"\n", + } + err := api.SelfServiceProfile.SetCustomText(context.Background(), ssop.GetID(), "en", "get-started", payload) + assert.Equal(t, err, nil) + retrievedCustomText, err := api.SelfServiceProfile.GetCustomText(context.Background(), ssop.GetID(), "en", "get-started") + assert.Equal(t, err, nil) + assert.Equal(t, payload, retrievedCustomText) +} + func TestSelfServiceProfileManager_CreateTicket(t *testing.T) { configureHTTPTestRecordings(t) ssop := givenASelfServiceProfile(t) @@ -147,6 +163,9 @@ func TestSelfServiceProfileManager_MarshalJSON(t *testing.T) { func givenASelfServiceProfile(t *testing.T) *SelfServiceProfile { t.Helper() ssop := &SelfServiceProfile{ + Name: auth0.String("Sample Self Service Profile"), + Description: auth0.String("Sample Desc"), + AllowedStrategies: []*string{auth0.String("oidc")}, Branding: &Branding{ LogoURL: auth0.String("https://example.com/logo.png"), Colors: &BrandingColors{ diff --git a/test/data/recordings/TestSelfServiceProfileManager_Create.yaml b/test/data/recordings/TestSelfServiceProfileManager_Create.yaml index 5c7b4b86..26d80029 100644 --- a/test/data/recordings/TestSelfServiceProfileManager_Create.yaml +++ b/test/data/recordings/TestSelfServiceProfileManager_Create.yaml @@ -6,20 +6,20 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 186 + content_length: 281 transfer_encoding: [] trailer: {} host: go-auth0-dev.eu.auth0.com remote_addr: "" request_uri: "" body: | - {"user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"branding":{"colors":{"primary":"#334455"},"logo_url":"https://example.com/logo.png"}} + {"name":"Sample Self Service Profile","description":"Sample Desc","allowed_strategies":["oidc"],"user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"branding":{"colors":{"primary":"#334455"},"logo_url":"https://example.com/logo.png"}} form: {} headers: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 + - Go-Auth0/1.11.2 url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles method: POST response: @@ -28,15 +28,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 299 + content_length: 394 uncompressed: false - body: '{"id":"ssp_8z3r5eqUUVBBC1QyZdV5Xq","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"created_at":"2024-08-16T06:32:10.792Z","updated_at":"2024-08-16T06:32:10.792Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}}' + body: '{"id":"ssp_qJjPnZcqrYMQnn5XbrwjDp","name":"Sample Self Service Profile","description":"Sample Desc","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"allowed_strategies":["oidc"],"created_at":"2024-11-03T11:22:35.206Z","updated_at":"2024-11-03T11:22:35.206Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 1.047568167s + duration: 999.470917ms - id: 1 request: proto: HTTP/1.1 @@ -54,8 +54,8 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 - url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_8z3r5eqUUVBBC1QyZdV5Xq + - Go-Auth0/1.11.2 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_qJjPnZcqrYMQnn5XbrwjDp method: GET response: proto: HTTP/2.0 @@ -65,13 +65,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"ssp_8z3r5eqUUVBBC1QyZdV5Xq","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"created_at":"2024-08-16T06:32:10.792Z","updated_at":"2024-08-16T06:32:10.792Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}}' + body: '{"id":"ssp_qJjPnZcqrYMQnn5XbrwjDp","name":"Sample Self Service Profile","description":"Sample Desc","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"allowed_strategies":["oidc"],"created_at":"2024-11-03T11:22:35.206Z","updated_at":"2024-11-03T11:22:35.206Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 410.606208ms + duration: 421.911834ms - id: 2 request: proto: HTTP/1.1 @@ -89,8 +89,8 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 - url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_8z3r5eqUUVBBC1QyZdV5Xq + - Go-Auth0/1.11.2 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_qJjPnZcqrYMQnn5XbrwjDp method: DELETE response: proto: HTTP/2.0 @@ -106,4 +106,4 @@ interactions: - application/json; charset=utf-8 status: 204 No Content code: 204 - duration: 405.070709ms + duration: 372.68675ms diff --git a/test/data/recordings/TestSelfServiceProfileManager_CreateTicket.yaml b/test/data/recordings/TestSelfServiceProfileManager_CreateTicket.yaml index cd457272..d2003548 100644 --- a/test/data/recordings/TestSelfServiceProfileManager_CreateTicket.yaml +++ b/test/data/recordings/TestSelfServiceProfileManager_CreateTicket.yaml @@ -6,20 +6,20 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 186 + content_length: 281 transfer_encoding: [] trailer: {} host: go-auth0-dev.eu.auth0.com remote_addr: "" request_uri: "" body: | - {"user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"branding":{"colors":{"primary":"#334455"},"logo_url":"https://example.com/logo.png"}} + {"name":"Sample Self Service Profile","description":"Sample Desc","allowed_strategies":["oidc"],"user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"branding":{"colors":{"primary":"#334455"},"logo_url":"https://example.com/logo.png"}} form: {} headers: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 + - Go-Auth0/1.11.2 url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles method: POST response: @@ -28,15 +28,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 299 + content_length: 394 uncompressed: false - body: '{"id":"ssp_ataTXvZB8LN7V8WTA5MkGi","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"created_at":"2024-08-16T11:28:41.125Z","updated_at":"2024-08-16T11:28:41.125Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}}' + body: '{"id":"ssp_och8KqA3AkfUuCBi4D76j8","name":"Sample Self Service Profile","description":"Sample Desc","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"allowed_strategies":["oidc"],"created_at":"2024-11-03T11:22:47.537Z","updated_at":"2024-11-03T11:22:47.537Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 931.360625ms + duration: 370.6825ms - id: 1 request: proto: HTTP/1.1 @@ -49,13 +49,13 @@ interactions: remote_addr: "" request_uri: "" body: | - {"name":"Test Client (Aug 16 16:58:41.202)","description":"This is just a test client.","jwt_configuration":{"alg":"RS256"},"organization_usage":"allow","client_authentication_methods":{"private_key_jwt":{"credentials":[{"name":"Test Credential (Aug 16 16:58:41.202)","credential_type":"public_key","pem":"-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAua6LXMfgDE/tDdkOL1Oe\n3oWUwg1r4dSTg9L7RCcI5hItUzmkVofHtWN0H4CH2lm2ANmaJUsnhzctYowYW2+R\ntHvU9afTmtbdhpy993972hUqZSYLsE3iGziphYkOKVsqq38+VRH3TNg93zSLoRao\nJnTTkMXseVqiyqYRmFN8+gQQoEclHSGPUWQG5XMZ+hhuXeFyo+Yw/qbZWca/6/2I\n3rsca9jXR1alhxhHrXrg8N4Dm3gBgGbmiht6YYYT2Tyl1OqB9+iOI/9D7dfoCF6X\nAWJXRE454cmC8k8oucpjZVpflA+ocKshwPDR6YTLQYbXYiaWxEoaz0QGUErNQBnG\nI+sr9jDY3ua/s6HF6h0qyi/HVZH4wx+m4CtOfJoYTjrGBbaRszzUxhtSN2/MhXDu\n+a35q9/2zcu/3fjkkfVvGUt+NyyiYOKQ9vsJC1g/xxdUWtowjNwjfZE2zcG4usi8\nr38Bp0lmiipAsMLduZM/D5dFXkRdWCBNDfULmmg/4nv2wwjbjQuLemAMh7mmrztW\ni/85WMnjKQZT8NqS43pmgyIzg1gK1neMqdS90YmQ/PvJ36qALxCs245w1JpN9BAL\nJbwxCg/dbmKT7PalfWrksx9hGcJxtGqebldaOpw+5GVIPxxtC1C0gVr9BKeiDS3f\naibASY5pIRiKENmbZELDtucCAwEAAQ==\n-----END PUBLIC KEY-----"}]}}} + {"name":"Test Client (Nov 3 16:52:47.523)","description":"This is just a test client.","jwt_configuration":{"alg":"RS256"},"organization_usage":"allow","client_authentication_methods":{"private_key_jwt":{"credentials":[{"name":"Test Credential (Nov 3 16:52:47.523)","credential_type":"public_key","pem":"-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAua6LXMfgDE/tDdkOL1Oe\n3oWUwg1r4dSTg9L7RCcI5hItUzmkVofHtWN0H4CH2lm2ANmaJUsnhzctYowYW2+R\ntHvU9afTmtbdhpy993972hUqZSYLsE3iGziphYkOKVsqq38+VRH3TNg93zSLoRao\nJnTTkMXseVqiyqYRmFN8+gQQoEclHSGPUWQG5XMZ+hhuXeFyo+Yw/qbZWca/6/2I\n3rsca9jXR1alhxhHrXrg8N4Dm3gBgGbmiht6YYYT2Tyl1OqB9+iOI/9D7dfoCF6X\nAWJXRE454cmC8k8oucpjZVpflA+ocKshwPDR6YTLQYbXYiaWxEoaz0QGUErNQBnG\nI+sr9jDY3ua/s6HF6h0qyi/HVZH4wx+m4CtOfJoYTjrGBbaRszzUxhtSN2/MhXDu\n+a35q9/2zcu/3fjkkfVvGUt+NyyiYOKQ9vsJC1g/xxdUWtowjNwjfZE2zcG4usi8\nr38Bp0lmiipAsMLduZM/D5dFXkRdWCBNDfULmmg/4nv2wwjbjQuLemAMh7mmrztW\ni/85WMnjKQZT8NqS43pmgyIzg1gK1neMqdS90YmQ/PvJ36qALxCs245w1JpN9BAL\nJbwxCg/dbmKT7PalfWrksx9hGcJxtGqebldaOpw+5GVIPxxtC1C0gVr9BKeiDS3f\naibASY5pIRiKENmbZELDtucCAwEAAQ==\n-----END PUBLIC KEY-----"}]}}} form: {} headers: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 + - Go-Auth0/1.11.2 url: https://go-auth0-dev.eu.auth0.com/api/v2/clients method: POST response: @@ -66,13 +66,13 @@ interactions: trailer: {} content_length: -1 uncompressed: false - body: '{"name":"Test Client (Aug 16 16:58:41.202)","description":"This is just a test client.","client_id":"8UJoAv2c7yghMFoPii3fMGwsUCCgplFG","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"alg":"RS256"},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000},"organization_usage":"allow","client_authentication_methods":{"private_key_jwt":{"credentials":[{"id":"cred_jtn6eX4JPWkTHqtbuASs1F","name":"Test Credential (Aug 16 16:58:41.202)","kid":"4e7yYf0TKdyTLbVnpq2wLN6mZ8t7eb9UJkMksyHj9iU","credential_type":"public_key","alg":"RS256","created_at":"2024-08-16T11:28:41.547Z","updated_at":"2024-08-16T11:28:41.547Z"}]}}}' + body: '{"name":"Test Client (Nov 3 16:52:47.523)","description":"This is just a test client.","client_id":"a3JzjSc3ul40MWEEjeg1KlQoCmjdjYc7","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"alg":"RS256"},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000},"organization_usage":"allow","client_authentication_methods":{"private_key_jwt":{"credentials":[{"id":"cred_1M67o2mntNLWYievZnaWuD","name":"Test Credential (Nov 3 16:52:47.523)","kid":"4e7yYf0TKdyTLbVnpq2wLN6mZ8t7eb9UJkMksyHj9iU","credential_type":"public_key","alg":"RS256","created_at":"2024-11-03T11:22:48.015Z","updated_at":"2024-11-03T11:22:48.015Z"}]}}}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 496.51ms + duration: 693.030334ms - id: 2 request: proto: HTTP/1.1 @@ -85,13 +85,13 @@ interactions: remote_addr: "" request_uri: "" body: | - {"name":"test-organization993","display_name":"Test Organization","branding":{"logo_url":"https://example.com/logo.gif"}} + {"name":"test-organization951","display_name":"Test Organization","branding":{"logo_url":"https://example.com/logo.gif"}} form: {} headers: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 + - Go-Auth0/1.11.2 url: https://go-auth0-dev.eu.auth0.com/api/v2/organizations method: POST response: @@ -102,13 +102,13 @@ interactions: trailer: {} content_length: 149 uncompressed: false - body: '{"branding":{"logo_url":"https://example.com/logo.gif"},"id":"org_it30IT2ZYGJGlGE8","display_name":"Test Organization","name":"test-organization993"}' + body: '{"branding":{"logo_url":"https://example.com/logo.gif"},"id":"org_jQN5TGbv2dCokEmh","display_name":"Test Organization","name":"test-organization951"}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 366.840083ms + duration: 404.32125ms - id: 3 request: proto: HTTP/1.1 @@ -121,14 +121,14 @@ interactions: remote_addr: "" request_uri: "" body: | - {"connection_config":{"name":"sso-generated-ticket"},"enabled_clients":["8UJoAv2c7yghMFoPii3fMGwsUCCgplFG"],"enabled_organizations":[{"organization_id":"org_it30IT2ZYGJGlGE8"}]} + {"connection_config":{"name":"sso-generated-ticket"},"enabled_clients":["a3JzjSc3ul40MWEEjeg1KlQoCmjdjYc7"],"enabled_organizations":[{"organization_id":"org_jQN5TGbv2dCokEmh"}]} form: {} headers: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 - url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_ataTXvZB8LN7V8WTA5MkGi/sso-ticket + - Go-Auth0/1.11.2 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_och8KqA3AkfUuCBi4D76j8/sso-ticket method: POST response: proto: HTTP/2.0 @@ -138,13 +138,13 @@ interactions: trailer: {} content_length: 148 uncompressed: false - body: '{"ticket":"https://go-auth0-dev.eu.auth0.com.sus.auth0.com/self-service/connections-flow?ticket=dOfSMtXcNhwmLBHzQxhOzuV4gBjfOD6d"}' + body: '{"ticket":"https://go-auth0-dev.eu.auth0.com.sus.auth0.com/self-service/connections-flow?ticket=TALck89q5exmLiu6ojI2kBd1clWQBJXJ"}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 380.580875ms + duration: 516.263875ms - id: 4 request: proto: HTTP/1.1 @@ -162,8 +162,8 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 - url: https://go-auth0-dev.eu.auth0.com/api/v2/organizations/org_it30IT2ZYGJGlGE8 + - Go-Auth0/1.11.2 + url: https://go-auth0-dev.eu.auth0.com/api/v2/organizations/org_jQN5TGbv2dCokEmh method: DELETE response: proto: HTTP/2.0 @@ -179,7 +179,7 @@ interactions: - application/json; charset=utf-8 status: 204 No Content code: 204 - duration: 350.997041ms + duration: 357.053ms - id: 5 request: proto: HTTP/1.1 @@ -197,8 +197,8 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 - url: https://go-auth0-dev.eu.auth0.com/api/v2/clients/8UJoAv2c7yghMFoPii3fMGwsUCCgplFG + - Go-Auth0/1.11.2 + url: https://go-auth0-dev.eu.auth0.com/api/v2/clients/a3JzjSc3ul40MWEEjeg1KlQoCmjdjYc7 method: DELETE response: proto: HTTP/2.0 @@ -214,7 +214,7 @@ interactions: - application/json; charset=utf-8 status: 204 No Content code: 204 - duration: 414.216916ms + duration: 432.445458ms - id: 6 request: proto: HTTP/1.1 @@ -232,8 +232,8 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 - url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_ataTXvZB8LN7V8WTA5MkGi + - Go-Auth0/1.11.2 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_och8KqA3AkfUuCBi4D76j8 method: DELETE response: proto: HTTP/2.0 @@ -249,4 +249,4 @@ interactions: - application/json; charset=utf-8 status: 204 No Content code: 204 - duration: 318.091416ms + duration: 379.054791ms diff --git a/test/data/recordings/TestSelfServiceProfileManager_Delete.yaml b/test/data/recordings/TestSelfServiceProfileManager_Delete.yaml index 41b28384..127a7964 100644 --- a/test/data/recordings/TestSelfServiceProfileManager_Delete.yaml +++ b/test/data/recordings/TestSelfServiceProfileManager_Delete.yaml @@ -6,20 +6,20 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 186 + content_length: 281 transfer_encoding: [] trailer: {} host: go-auth0-dev.eu.auth0.com remote_addr: "" request_uri: "" body: | - {"user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"branding":{"colors":{"primary":"#334455"},"logo_url":"https://example.com/logo.png"}} + {"name":"Sample Self Service Profile","description":"Sample Desc","allowed_strategies":["oidc"],"user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"branding":{"colors":{"primary":"#334455"},"logo_url":"https://example.com/logo.png"}} form: {} headers: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 + - Go-Auth0/1.11.2 url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles method: POST response: @@ -28,15 +28,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 299 + content_length: 394 uncompressed: false - body: '{"id":"ssp_5rVuEYmwYVsfZdeXWkBJGT","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"created_at":"2024-08-16T11:52:05.779Z","updated_at":"2024-08-16T11:52:05.779Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}}' + body: '{"id":"ssp_xi7cRjfZUKe3ZDJRGfbQnP","name":"Sample Self Service Profile","description":"Sample Desc","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"allowed_strategies":["oidc"],"created_at":"2024-11-03T11:22:43.087Z","updated_at":"2024-11-03T11:22:43.087Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 840.582833ms + duration: 1.390025625s - id: 1 request: proto: HTTP/1.1 @@ -54,8 +54,8 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 - url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_5rVuEYmwYVsfZdeXWkBJGT + - Go-Auth0/1.11.2 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_xi7cRjfZUKe3ZDJRGfbQnP method: DELETE response: proto: HTTP/2.0 @@ -71,7 +71,7 @@ interactions: - application/json; charset=utf-8 status: 204 No Content code: 204 - duration: 345.848333ms + duration: 1.355147s - id: 2 request: proto: HTTP/1.1 @@ -89,8 +89,8 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 - url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_5rVuEYmwYVsfZdeXWkBJGT + - Go-Auth0/1.11.2 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_xi7cRjfZUKe3ZDJRGfbQnP method: GET response: proto: HTTP/2.0 @@ -100,13 +100,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"statusCode":404,"error":"Not Found","message":"Profile with ID: ssp_5rVuEYmwYVsfZdeXWkBJGT not found"}' + body: '{"statusCode":404,"error":"Not Found","message":"Profile with ID: ssp_xi7cRjfZUKe3ZDJRGfbQnP not found"}' headers: Content-Type: - application/json; charset=utf-8 status: 404 Not Found code: 404 - duration: 350.736291ms + duration: 819.694833ms - id: 3 request: proto: HTTP/1.1 @@ -124,8 +124,8 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 - url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_5rVuEYmwYVsfZdeXWkBJGT + - Go-Auth0/1.11.2 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_xi7cRjfZUKe3ZDJRGfbQnP method: DELETE response: proto: HTTP/2.0 @@ -141,4 +141,4 @@ interactions: - application/json; charset=utf-8 status: 204 No Content code: 204 - duration: 343.957583ms + duration: 440.794959ms diff --git a/test/data/recordings/TestSelfServiceProfileManager_List.yaml b/test/data/recordings/TestSelfServiceProfileManager_List.yaml index 1bdce433..3baf0799 100644 --- a/test/data/recordings/TestSelfServiceProfileManager_List.yaml +++ b/test/data/recordings/TestSelfServiceProfileManager_List.yaml @@ -6,20 +6,20 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 186 + content_length: 281 transfer_encoding: [] trailer: {} host: go-auth0-dev.eu.auth0.com remote_addr: "" request_uri: "" body: | - {"user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"branding":{"colors":{"primary":"#334455"},"logo_url":"https://example.com/logo.png"}} + {"name":"Sample Self Service Profile","description":"Sample Desc","allowed_strategies":["oidc"],"user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"branding":{"colors":{"primary":"#334455"},"logo_url":"https://example.com/logo.png"}} form: {} headers: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 + - Go-Auth0/1.11.2 url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles method: POST response: @@ -28,15 +28,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 299 + content_length: 394 uncompressed: false - body: '{"id":"ssp_qDHPZo3Num6pqrs3zJjpo5","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"created_at":"2024-08-16T04:47:26.042Z","updated_at":"2024-08-16T04:47:26.042Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}}' + body: '{"id":"ssp_phtUR1GUidfLrYkboHXwEz","name":"Sample Self Service Profile","description":"Sample Desc","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"allowed_strategies":["oidc"],"created_at":"2024-11-03T11:22:36.392Z","updated_at":"2024-11-03T11:22:36.392Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 364.893042ms + duration: 400.065125ms - id: 1 request: proto: HTTP/1.1 @@ -54,7 +54,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 + - Go-Auth0/1.11.2 url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles?include_totals=true&per_page=50 method: GET response: @@ -65,13 +65,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '[{"id":"ssp_qDHPZo3Num6pqrs3zJjpo5","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"created_at":"2024-08-16T04:47:26.042Z","updated_at":"2024-08-16T04:47:26.042Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}}]' + body: '{"self_service_profiles":[{"id":"ssp_iWfKxu6gD5yrdn5fFCJmPy","name":"Default","user_attributes":[{"name":"temporary-name","description":"temporary-description","is_optional":false},{"name":"Email","description":"Email of the user","is_optional":false}],"allowed_strategies":["oidc","samlp","waad","google-apps","adfs","okta"],"created_at":"2024-08-26T08:05:28.700Z","updated_at":"2024-09-05T10:24:25.448Z","branding":{"logo_url":"https://example1.com","colors":{"primary":"#000000"}}},{"id":"ssp_25cy2NK6URnoYznQjdKBhJ","name":"Test Self Service Profile","description":"Sample Description","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"allowed_strategies":["oidc"],"created_at":"2024-11-02T21:47:20.662Z","updated_at":"2024-11-02T21:47:20.662Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}},{"id":"ssp_iRgrA1NCG6MssoSYTqaVkP","name":"Test Self Service Profile","description":"Sample Description","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"allowed_strategies":["oidc"],"created_at":"2024-11-02T22:12:40.704Z","updated_at":"2024-11-02T22:12:40.704Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}},{"id":"ssp_qVGSXZKfPu52o3a9KPazoa","name":"Test Self Service Profile","description":"Sample Description","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"allowed_strategies":["oidc"],"created_at":"2024-11-02T22:54:30.033Z","updated_at":"2024-11-02T22:54:30.033Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}},{"id":"ssp_92CJaWR1ANrhLaFcYkbtWM","name":"Test Self Service Profile","description":"Sample Description","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"allowed_strategies":["oidc"],"created_at":"2024-11-02T22:56:32.638Z","updated_at":"2024-11-02T22:56:32.638Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}},{"id":"ssp_oUrXXpQpRUmGUgzN3yj9sS","name":"Test Self Service Profile","description":"Sample Description","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"allowed_strategies":["oidc"],"created_at":"2024-11-02T22:59:49.720Z","updated_at":"2024-11-02T22:59:49.720Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}},{"id":"ssp_nPMRi5JbUj2Zwm3AQ61HGH","name":"Test Self Service Profile","description":"Sample Description","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"allowed_strategies":["oidc"],"created_at":"2024-11-02T23:00:32.193Z","updated_at":"2024-11-02T23:00:32.193Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}},{"id":"ssp_2KaAu4XFJrspydjqdiHw5g","name":"Test Self Service Profile","description":"Sample Description","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"allowed_strategies":["oidc"],"created_at":"2024-11-02T23:25:18.142Z","updated_at":"2024-11-02T23:25:18.142Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}},{"id":"ssp_f5xKkP6ADKPXYyM9UVAPk6","name":"Sample Self Service Profile","description":"Sample Desc","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"allowed_strategies":["oidc"],"created_at":"2024-11-03T11:06:35.013Z","updated_at":"2024-11-03T11:06:35.013Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}},{"id":"ssp_phtUR1GUidfLrYkboHXwEz","name":"Sample Self Service Profile","description":"Sample Desc","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"allowed_strategies":["oidc"],"created_at":"2024-11-03T11:22:36.392Z","updated_at":"2024-11-03T11:22:36.392Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}}],"start":0,"limit":50,"total":10}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 328.563042ms + duration: 385.9405ms - id: 2 request: proto: HTTP/1.1 @@ -89,8 +89,8 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 - url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_qDHPZo3Num6pqrs3zJjpo5 + - Go-Auth0/1.11.2 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_phtUR1GUidfLrYkboHXwEz method: DELETE response: proto: HTTP/2.0 @@ -106,4 +106,4 @@ interactions: - application/json; charset=utf-8 status: 204 No Content code: 204 - duration: 389.384ms + duration: 375.619875ms diff --git a/test/data/recordings/TestSelfServiceProfileManager_Read.yaml b/test/data/recordings/TestSelfServiceProfileManager_Read.yaml index 2550f491..b6370daa 100644 --- a/test/data/recordings/TestSelfServiceProfileManager_Read.yaml +++ b/test/data/recordings/TestSelfServiceProfileManager_Read.yaml @@ -6,20 +6,20 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 186 + content_length: 281 transfer_encoding: [] trailer: {} host: go-auth0-dev.eu.auth0.com remote_addr: "" request_uri: "" body: | - {"user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"branding":{"colors":{"primary":"#334455"},"logo_url":"https://example.com/logo.png"}} + {"name":"Sample Self Service Profile","description":"Sample Desc","allowed_strategies":["oidc"],"user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"branding":{"colors":{"primary":"#334455"},"logo_url":"https://example.com/logo.png"}} form: {} headers: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 + - Go-Auth0/1.11.2 url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles method: POST response: @@ -28,15 +28,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 299 + content_length: 394 uncompressed: false - body: '{"id":"ssp_5z7VgvtdZvRa2GKFgPubrV","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"created_at":"2024-08-16T04:47:27.100Z","updated_at":"2024-08-16T04:47:27.100Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}}' + body: '{"id":"ssp_gWpVmhK4RAN2UGyhGYw6fa","name":"Sample Self Service Profile","description":"Sample Desc","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"allowed_strategies":["oidc"],"created_at":"2024-11-03T11:22:37.535Z","updated_at":"2024-11-03T11:22:37.535Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 333.569334ms + duration: 372.946417ms - id: 1 request: proto: HTTP/1.1 @@ -54,8 +54,8 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 - url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_5z7VgvtdZvRa2GKFgPubrV + - Go-Auth0/1.11.2 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_gWpVmhK4RAN2UGyhGYw6fa method: GET response: proto: HTTP/2.0 @@ -65,13 +65,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"ssp_5z7VgvtdZvRa2GKFgPubrV","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"created_at":"2024-08-16T04:47:27.100Z","updated_at":"2024-08-16T04:47:27.100Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}}' + body: '{"id":"ssp_gWpVmhK4RAN2UGyhGYw6fa","name":"Sample Self Service Profile","description":"Sample Desc","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"allowed_strategies":["oidc"],"created_at":"2024-11-03T11:22:37.535Z","updated_at":"2024-11-03T11:22:37.535Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 335.251209ms + duration: 372.472959ms - id: 2 request: proto: HTTP/1.1 @@ -89,8 +89,8 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 - url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_5z7VgvtdZvRa2GKFgPubrV + - Go-Auth0/1.11.2 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_gWpVmhK4RAN2UGyhGYw6fa method: DELETE response: proto: HTTP/2.0 @@ -106,4 +106,4 @@ interactions: - application/json; charset=utf-8 status: 204 No Content code: 204 - duration: 326.430334ms + duration: 428.606917ms diff --git a/test/data/recordings/TestSelfServiceProfileManager_SetGetCustomText.yaml b/test/data/recordings/TestSelfServiceProfileManager_SetGetCustomText.yaml new file mode 100644 index 00000000..47dba9e7 --- /dev/null +++ b/test/data/recordings/TestSelfServiceProfileManager_SetGetCustomText.yaml @@ -0,0 +1,145 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 281 + transfer_encoding: [] + trailer: {} + host: go-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"Sample Self Service Profile","description":"Sample Desc","allowed_strategies":["oidc"],"user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"branding":{"colors":{"primary":"#334455"},"logo_url":"https://example.com/logo.png"}} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0/1.11.2 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 394 + uncompressed: false + body: '{"id":"ssp_ewp8V2UgURp3k4d3AEVtdD","name":"Sample Self Service Profile","description":"Sample Desc","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"allowed_strategies":["oidc"],"created_at":"2024-11-03T11:22:46.060Z","updated_at":"2024-11-03T11:22:46.060Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 343.682541ms + - id: 1 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 101 + transfer_encoding: [] + trailer: {} + host: go-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"introduction":"\"Welcome! With only a few steps you'll be able to setup your new connection.\"\n"} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0/1.11.2 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_ewp8V2UgURp3k4d3AEVtdD/custom-text/en/get-started + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"introduction":"\"Welcome! With only a few steps you''ll be able to setup your new connection.\"\n"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 361.896375ms + - id: 2 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: go-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0/1.11.2 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_ewp8V2UgURp3k4d3AEVtdD/custom-text/en/get-started + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"introduction":"\"Welcome! With only a few steps you''ll be able to setup your new connection.\"\n"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 362.033208ms + - id: 3 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: go-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0/1.11.2 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_ewp8V2UgURp3k4d3AEVtdD + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 0 + uncompressed: false + body: "" + headers: + Content-Type: + - application/json; charset=utf-8 + status: 204 No Content + code: 204 + duration: 370.916292ms diff --git a/test/data/recordings/TestSelfServiceProfileManager_Update.yaml b/test/data/recordings/TestSelfServiceProfileManager_Update.yaml index 0741751d..77487baf 100644 --- a/test/data/recordings/TestSelfServiceProfileManager_Update.yaml +++ b/test/data/recordings/TestSelfServiceProfileManager_Update.yaml @@ -6,20 +6,20 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 186 + content_length: 281 transfer_encoding: [] trailer: {} host: go-auth0-dev.eu.auth0.com remote_addr: "" request_uri: "" body: | - {"user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"branding":{"colors":{"primary":"#334455"},"logo_url":"https://example.com/logo.png"}} + {"name":"Sample Self Service Profile","description":"Sample Desc","allowed_strategies":["oidc"],"user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"branding":{"colors":{"primary":"#334455"},"logo_url":"https://example.com/logo.png"}} form: {} headers: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 + - Go-Auth0/1.11.2 url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles method: POST response: @@ -28,15 +28,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 299 + content_length: 394 uncompressed: false - body: '{"id":"ssp_ucmMn4kiwy3cVSbcqd12ab","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"created_at":"2024-08-16T11:28:59.875Z","updated_at":"2024-08-16T11:28:59.875Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}}' + body: '{"id":"ssp_6ZpGku5zb9rtSK5yeuNHgH","name":"Sample Self Service Profile","description":"Sample Desc","user_attributes":[{"name":"some-name-here","description":"some-description","is_optional":true}],"allowed_strategies":["oidc"],"created_at":"2024-11-03T11:22:39.024Z","updated_at":"2024-11-03T11:22:39.024Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 812.088292ms + duration: 689.450959ms - id: 1 request: proto: HTTP/1.1 @@ -55,8 +55,8 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 - url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_ucmMn4kiwy3cVSbcqd12ab + - Go-Auth0/1.11.2 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_6ZpGku5zb9rtSK5yeuNHgH method: PATCH response: proto: HTTP/2.0 @@ -66,13 +66,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"ssp_ucmMn4kiwy3cVSbcqd12ab","user_attributes":[{"name":"some-new-name-here","description":"some-description","is_optional":true}],"created_at":"2024-08-16T11:28:59.875Z","updated_at":"2024-08-16T11:29:00.219Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}}' + body: '{"id":"ssp_6ZpGku5zb9rtSK5yeuNHgH","name":"Sample Self Service Profile","description":"Sample Desc","user_attributes":[{"name":"some-new-name-here","description":"some-description","is_optional":true}],"allowed_strategies":["oidc"],"created_at":"2024-11-03T11:22:39.024Z","updated_at":"2024-11-03T11:22:40.247Z","branding":{"logo_url":"https://example.com/logo.png","colors":{"primary":"#334455"}}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 326.74275ms + duration: 1.216916s - id: 2 request: proto: HTTP/1.1 @@ -90,8 +90,8 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0/1.8.0 - url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_ucmMn4kiwy3cVSbcqd12ab + - Go-Auth0/1.11.2 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_6ZpGku5zb9rtSK5yeuNHgH method: DELETE response: proto: HTTP/2.0 @@ -107,4 +107,4 @@ interactions: - application/json; charset=utf-8 status: 204 No Content code: 204 - duration: 338.375875ms + duration: 1.450706666s