diff --git a/internal/client/client.go b/internal/client/client.go index e0d73ef2..2bef50a3 100644 --- a/internal/client/client.go +++ b/internal/client/client.go @@ -161,9 +161,9 @@ func backoffDelay() rehttp.DelayFn { return func(attempt rehttp.Attempt) time.Duration { wait := baseDelay * math.Pow(2, float64(attempt.Index)) - min := wait + 1 - max := wait + baseDelay - wait = PRNG.Float64()*(max-min) + min + minValue := wait + 1 + maxValue := wait + baseDelay + wait = PRNG.Float64()*(maxValue-minValue) + minValue wait = math.Min(wait, maxDelay) wait = math.Max(wait, minDelay) diff --git a/management/management.gen.go b/management/management.gen.go index 3115b6b8..ba3231ec 100644 --- a/management/management.gen.go +++ b/management/management.gen.go @@ -10037,6 +10037,14 @@ func (s *ScreenPartials) String() string { return Stringify(s) } +// GetAllowedStrategies returns the AllowedStrategies field if it's non-nil, zero value otherwise. +func (s *SelfServiceProfile) GetAllowedStrategies() []string { + if s == nil || s.AllowedStrategies == nil { + return nil + } + return *s.AllowedStrategies +} + // GetBranding returns the Branding field. func (s *SelfServiceProfile) GetBranding() *Branding { if s == nil { @@ -10053,6 +10061,14 @@ func (s *SelfServiceProfile) GetCreatedAt() time.Time { return *s.CreatedAt } +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (s *SelfServiceProfile) GetDescription() string { + if s == nil || s.Description == nil { + return "" + } + return *s.Description +} + // GetID returns the ID field if it's non-nil, zero value otherwise. func (s *SelfServiceProfile) GetID() string { if s == nil || s.ID == nil { @@ -10061,6 +10077,14 @@ func (s *SelfServiceProfile) GetID() string { return *s.ID } +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (s *SelfServiceProfile) GetName() string { + if s == nil || s.Name == nil { + return "" + } + return *s.Name +} + // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. func (s *SelfServiceProfile) GetUpdatedAt() time.Time { if s == nil || s.UpdatedAt == nil { @@ -10074,6 +10098,11 @@ func (s *SelfServiceProfile) String() string { return Stringify(s) } +// String returns a string representation of SelfServiceProfileList. +func (s *SelfServiceProfileList) String() string { + return Stringify(s) +} + // GetConnectionConfig returns the ConnectionConfig field. func (s *SelfServiceProfileTicket) GetConnectionConfig() *SelfServiceProfileTicketConnectionConfig { if s == nil { @@ -10090,6 +10119,14 @@ func (s *SelfServiceProfileTicket) GetConnectionID() string { return *s.ConnectionID } +// GetEnabledClients returns the EnabledClients field if it's non-nil, zero value otherwise. +func (s *SelfServiceProfileTicket) GetEnabledClients() []string { + if s == nil || s.EnabledClients == nil { + return nil + } + return *s.EnabledClients +} + // GetTicket returns the Ticket field if it's non-nil, zero value otherwise. func (s *SelfServiceProfileTicket) GetTicket() string { if s == nil || s.Ticket == nil { @@ -10103,11 +10140,104 @@ func (s *SelfServiceProfileTicket) String() string { return Stringify(s) } +// GetDisplayName returns the DisplayName field if it's non-nil, zero value otherwise. +func (s *SelfServiceProfileTicketConnectionConfig) GetDisplayName() string { + if s == nil || s.DisplayName == nil { + return "" + } + return *s.DisplayName +} + +// GetIsDomainConnection returns the IsDomainConnection field if it's non-nil, zero value otherwise. +func (s *SelfServiceProfileTicketConnectionConfig) GetIsDomainConnection() bool { + if s == nil || s.IsDomainConnection == nil { + return false + } + return *s.IsDomainConnection +} + +// GetMetadata returns the Metadata field if it's non-nil, zero value otherwise. +func (s *SelfServiceProfileTicketConnectionConfig) GetMetadata() map[string]interface{} { + if s == nil || s.Metadata == nil { + return map[string]interface{}{} + } + return *s.Metadata +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (s *SelfServiceProfileTicketConnectionConfig) GetName() string { + if s == nil || s.Name == nil { + return "" + } + return *s.Name +} + +// GetOptions returns the Options field. +func (s *SelfServiceProfileTicketConnectionConfig) GetOptions() *SelfServiceProfileTicketConnectionConfigOptions { + if s == nil { + return nil + } + return s.Options +} + +// GetShowAsButton returns the ShowAsButton field if it's non-nil, zero value otherwise. +func (s *SelfServiceProfileTicketConnectionConfig) GetShowAsButton() bool { + if s == nil || s.ShowAsButton == nil { + return false + } + return *s.ShowAsButton +} + // String returns a string representation of SelfServiceProfileTicketConnectionConfig. func (s *SelfServiceProfileTicketConnectionConfig) String() string { return Stringify(s) } +// GetDomainAliases returns the DomainAliases field if it's non-nil, zero value otherwise. +func (s *SelfServiceProfileTicketConnectionConfigOptions) GetDomainAliases() []string { + if s == nil || s.DomainAliases == nil { + return nil + } + return *s.DomainAliases +} + +// GetIconURL returns the IconURL field if it's non-nil, zero value otherwise. +func (s *SelfServiceProfileTicketConnectionConfigOptions) GetIconURL() string { + if s == nil || s.IconURL == nil { + return "" + } + return *s.IconURL +} + +// String returns a string representation of SelfServiceProfileTicketConnectionConfigOptions. +func (s *SelfServiceProfileTicketConnectionConfigOptions) String() string { + return Stringify(s) +} + +// GetAssignMembershipOnLogin returns the AssignMembershipOnLogin field if it's non-nil, zero value otherwise. +func (s *SelfServiceProfileTicketEnabledOrganizations) GetAssignMembershipOnLogin() bool { + if s == nil || s.AssignMembershipOnLogin == nil { + return false + } + return *s.AssignMembershipOnLogin +} + +// GetOrganizationID returns the OrganizationID field if it's non-nil, zero value otherwise. +func (s *SelfServiceProfileTicketEnabledOrganizations) GetOrganizationID() string { + if s == nil || s.OrganizationID == nil { + return "" + } + return *s.OrganizationID +} + +// GetShowAsButton returns the ShowAsButton field if it's non-nil, zero value otherwise. +func (s *SelfServiceProfileTicketEnabledOrganizations) GetShowAsButton() bool { + if s == nil || s.ShowAsButton == nil { + return false + } + return *s.ShowAsButton +} + // String returns a string representation of SelfServiceProfileTicketEnabledOrganizations. func (s *SelfServiceProfileTicketEnabledOrganizations) String() string { return Stringify(s) diff --git a/management/management.gen_test.go b/management/management.gen_test.go index d8e26b76..94d79d2e 100644 --- a/management/management.gen_test.go +++ b/management/management.gen_test.go @@ -12626,6 +12626,16 @@ func TestScreenPartials_String(t *testing.T) { } } +func TestSelfServiceProfile_GetAllowedStrategies(tt *testing.T) { + var zeroValue []string + s := &SelfServiceProfile{AllowedStrategies: &zeroValue} + s.GetAllowedStrategies() + s = &SelfServiceProfile{} + s.GetAllowedStrategies() + s = nil + s.GetAllowedStrategies() +} + func TestSelfServiceProfile_GetBranding(tt *testing.T) { s := &SelfServiceProfile{} s.GetBranding() @@ -12643,6 +12653,16 @@ func TestSelfServiceProfile_GetCreatedAt(tt *testing.T) { s.GetCreatedAt() } +func TestSelfServiceProfile_GetDescription(tt *testing.T) { + var zeroValue string + s := &SelfServiceProfile{Description: &zeroValue} + s.GetDescription() + s = &SelfServiceProfile{} + s.GetDescription() + s = nil + s.GetDescription() +} + func TestSelfServiceProfile_GetID(tt *testing.T) { var zeroValue string s := &SelfServiceProfile{ID: &zeroValue} @@ -12653,6 +12673,16 @@ func TestSelfServiceProfile_GetID(tt *testing.T) { s.GetID() } +func TestSelfServiceProfile_GetName(tt *testing.T) { + var zeroValue string + s := &SelfServiceProfile{Name: &zeroValue} + s.GetName() + s = &SelfServiceProfile{} + s.GetName() + s = nil + s.GetName() +} + func TestSelfServiceProfile_GetUpdatedAt(tt *testing.T) { var zeroValue time.Time s := &SelfServiceProfile{UpdatedAt: &zeroValue} @@ -12671,6 +12701,14 @@ func TestSelfServiceProfile_String(t *testing.T) { } } +func TestSelfServiceProfileList_String(t *testing.T) { + var rawJSON json.RawMessage + v := &SelfServiceProfileList{} + if err := json.Unmarshal([]byte(v.String()), &rawJSON); err != nil { + t.Errorf("failed to produce a valid json") + } +} + func TestSelfServiceProfileTicket_GetConnectionConfig(tt *testing.T) { s := &SelfServiceProfileTicket{} s.GetConnectionConfig() @@ -12688,6 +12726,16 @@ func TestSelfServiceProfileTicket_GetConnectionID(tt *testing.T) { s.GetConnectionID() } +func TestSelfServiceProfileTicket_GetEnabledClients(tt *testing.T) { + var zeroValue []string + s := &SelfServiceProfileTicket{EnabledClients: &zeroValue} + s.GetEnabledClients() + s = &SelfServiceProfileTicket{} + s.GetEnabledClients() + s = nil + s.GetEnabledClients() +} + func TestSelfServiceProfileTicket_GetTicket(tt *testing.T) { var zeroValue string s := &SelfServiceProfileTicket{Ticket: &zeroValue} @@ -12706,6 +12754,63 @@ func TestSelfServiceProfileTicket_String(t *testing.T) { } } +func TestSelfServiceProfileTicketConnectionConfig_GetDisplayName(tt *testing.T) { + var zeroValue string + s := &SelfServiceProfileTicketConnectionConfig{DisplayName: &zeroValue} + s.GetDisplayName() + s = &SelfServiceProfileTicketConnectionConfig{} + s.GetDisplayName() + s = nil + s.GetDisplayName() +} + +func TestSelfServiceProfileTicketConnectionConfig_GetIsDomainConnection(tt *testing.T) { + var zeroValue bool + s := &SelfServiceProfileTicketConnectionConfig{IsDomainConnection: &zeroValue} + s.GetIsDomainConnection() + s = &SelfServiceProfileTicketConnectionConfig{} + s.GetIsDomainConnection() + s = nil + s.GetIsDomainConnection() +} + +func TestSelfServiceProfileTicketConnectionConfig_GetMetadata(tt *testing.T) { + var zeroValue map[string]interface{} + s := &SelfServiceProfileTicketConnectionConfig{Metadata: &zeroValue} + s.GetMetadata() + s = &SelfServiceProfileTicketConnectionConfig{} + s.GetMetadata() + s = nil + s.GetMetadata() +} + +func TestSelfServiceProfileTicketConnectionConfig_GetName(tt *testing.T) { + var zeroValue string + s := &SelfServiceProfileTicketConnectionConfig{Name: &zeroValue} + s.GetName() + s = &SelfServiceProfileTicketConnectionConfig{} + s.GetName() + s = nil + s.GetName() +} + +func TestSelfServiceProfileTicketConnectionConfig_GetOptions(tt *testing.T) { + s := &SelfServiceProfileTicketConnectionConfig{} + s.GetOptions() + s = nil + s.GetOptions() +} + +func TestSelfServiceProfileTicketConnectionConfig_GetShowAsButton(tt *testing.T) { + var zeroValue bool + s := &SelfServiceProfileTicketConnectionConfig{ShowAsButton: &zeroValue} + s.GetShowAsButton() + s = &SelfServiceProfileTicketConnectionConfig{} + s.GetShowAsButton() + s = nil + s.GetShowAsButton() +} + func TestSelfServiceProfileTicketConnectionConfig_String(t *testing.T) { var rawJSON json.RawMessage v := &SelfServiceProfileTicketConnectionConfig{} @@ -12714,6 +12819,64 @@ func TestSelfServiceProfileTicketConnectionConfig_String(t *testing.T) { } } +func TestSelfServiceProfileTicketConnectionConfigOptions_GetDomainAliases(tt *testing.T) { + var zeroValue []string + s := &SelfServiceProfileTicketConnectionConfigOptions{DomainAliases: &zeroValue} + s.GetDomainAliases() + s = &SelfServiceProfileTicketConnectionConfigOptions{} + s.GetDomainAliases() + s = nil + s.GetDomainAliases() +} + +func TestSelfServiceProfileTicketConnectionConfigOptions_GetIconURL(tt *testing.T) { + var zeroValue string + s := &SelfServiceProfileTicketConnectionConfigOptions{IconURL: &zeroValue} + s.GetIconURL() + s = &SelfServiceProfileTicketConnectionConfigOptions{} + s.GetIconURL() + s = nil + s.GetIconURL() +} + +func TestSelfServiceProfileTicketConnectionConfigOptions_String(t *testing.T) { + var rawJSON json.RawMessage + v := &SelfServiceProfileTicketConnectionConfigOptions{} + if err := json.Unmarshal([]byte(v.String()), &rawJSON); err != nil { + t.Errorf("failed to produce a valid json") + } +} + +func TestSelfServiceProfileTicketEnabledOrganizations_GetAssignMembershipOnLogin(tt *testing.T) { + var zeroValue bool + s := &SelfServiceProfileTicketEnabledOrganizations{AssignMembershipOnLogin: &zeroValue} + s.GetAssignMembershipOnLogin() + s = &SelfServiceProfileTicketEnabledOrganizations{} + s.GetAssignMembershipOnLogin() + s = nil + s.GetAssignMembershipOnLogin() +} + +func TestSelfServiceProfileTicketEnabledOrganizations_GetOrganizationID(tt *testing.T) { + var zeroValue string + s := &SelfServiceProfileTicketEnabledOrganizations{OrganizationID: &zeroValue} + s.GetOrganizationID() + s = &SelfServiceProfileTicketEnabledOrganizations{} + s.GetOrganizationID() + s = nil + s.GetOrganizationID() +} + +func TestSelfServiceProfileTicketEnabledOrganizations_GetShowAsButton(tt *testing.T) { + var zeroValue bool + s := &SelfServiceProfileTicketEnabledOrganizations{ShowAsButton: &zeroValue} + s.GetShowAsButton() + s = &SelfServiceProfileTicketEnabledOrganizations{} + s.GetShowAsButton() + s = nil + s.GetShowAsButton() +} + func TestSelfServiceProfileTicketEnabledOrganizations_String(t *testing.T) { var rawJSON json.RawMessage v := &SelfServiceProfileTicketEnabledOrganizations{} diff --git a/management/self_service_profiles.go b/management/self_service_profiles.go index adeb1cd1..5fe135d4 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 @@ -46,12 +61,14 @@ type SelfServiceProfileTicket struct { // List of client_ids that the // connection will be enabled for. - EnabledClients []*string `json:"enabled_clients,omitempty"` + EnabledClients *[]string `json:"enabled_clients,omitempty"` // List of organizations that the // connection will be enabled for. EnabledOrganizations []*SelfServiceProfileTicketEnabledOrganizations `json:"enabled_organizations,omitempty"` + TTLSec int `json:"ttl_sec,omitempty"` + // The ticket that is generated. Ticket *string `json:"ticket,omitempty"` } @@ -60,25 +77,48 @@ type SelfServiceProfileTicket struct { type SelfServiceProfileTicketConnectionConfig struct { // The name of the connection that will be // created as a part of the SSO flow. - Name string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` + + // The display name of the connection that will be + // created as a part of the SSO flow. + DisplayName *string `json:"display_name,omitempty"` + + IsDomainConnection *bool `json:"is_domain_connection,omitempty"` + ShowAsButton *bool `json:"show_as_button,omitempty"` + Metadata *map[string]interface{} `json:"metadata,omitempty"` + Options *SelfServiceProfileTicketConnectionConfigOptions `json:"options,omitempty"` +} + +// SelfServiceProfileTicketConnectionConfigOptions is the list of Options for SSO Ticket. +type SelfServiceProfileTicketConnectionConfigOptions struct { + IconURL *string `json:"icon_url,omitempty"` + DomainAliases *[]string `json:"domain_aliases,omitempty"` } // SelfServiceProfileTicketEnabledOrganizations is the list of Organizations associated with the SSO Ticket. type SelfServiceProfileTicketEnabledOrganizations struct { // Organization identifier. - OrganizationID string `json:"organization_id,omitempty"` + OrganizationID *string `json:"organization_id,omitempty"` + AssignMembershipOnLogin *bool `json:"assign_membership_on_login,omitempty"` + ShowAsButton *bool `json:"show_as_button,omitempty"` } // 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 +132,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,8 +153,26 @@ 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...) return } + +// RevokeTicket revokes the sso-access ticket against a specific SSO Profile. +func (m *SelfServiceProfileManager) RevokeTicket(ctx context.Context, id string, ticketID string, opts ...RequestOption) (err error) { + err = m.management.Request(ctx, "POST", m.management.URI("self-service-profiles", id, "sso-ticket", ticketID, "revoke"), nil, opts...) + return +} diff --git a/management/self_service_profiles_test.go b/management/self_service_profiles_test.go index 12cbe935..b7e4a63c 100644 --- a/management/self_service_profiles_test.go +++ b/management/self_service_profiles_test.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "net/http" + "net/url" "testing" "time" @@ -15,6 +16,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{"oidc"}, Branding: &Branding{ LogoURL: auth0.String("https://example.com/logo.png"), Colors: &BrandingColors{ @@ -45,8 +49,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,7 +96,20 @@ func TestSelfServiceProfileManager_Delete(t *testing.T) { assert.Equal(t, http.StatusNotFound, err.(Error).Status()) } -func TestSelfServiceProfileManager_CreateTicket(t *testing.T) { +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_CreateAndRevokeTicket(t *testing.T) { configureHTTPTestRecordings(t) ssop := givenASelfServiceProfile(t) client := givenAClient(t) @@ -100,18 +117,39 @@ func TestSelfServiceProfileManager_CreateTicket(t *testing.T) { ticket := &SelfServiceProfileTicket{ ConnectionConfig: &SelfServiceProfileTicketConnectionConfig{ - Name: "sso-generated-ticket", + Name: auth0.String("sso-generated-ticket"), + DisplayName: auth0.String("sso-generated-ticket-display-name"), + IsDomainConnection: auth0.Bool(true), + ShowAsButton: auth0.Bool(true), + Metadata: &map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, + Options: &SelfServiceProfileTicketConnectionConfigOptions{ + IconURL: auth0.String("https://metabox.com/my_icon.jpeg"), + DomainAliases: &[]string{"okta.com"}, + }, }, - EnabledClients: []*string{auth0.String(client.GetClientID())}, + EnabledClients: &[]string{client.GetClientID()}, EnabledOrganizations: []*SelfServiceProfileTicketEnabledOrganizations{ { - org.GetID(), + AssignMembershipOnLogin: auth0.Bool(true), + ShowAsButton: auth0.Bool(true), + OrganizationID: auth0.String(org.GetID()), }, }, } err := api.SelfServiceProfile.CreateTicket(context.Background(), ssop.GetID(), ticket) assert.NoError(t, err) assert.NotEmpty(t, ticket.GetTicket()) + + ticketURL := ticket.GetTicket() + ticketIDMap, err := url.ParseQuery(ticketURL) + if err != nil { + ticketID := ticketIDMap["ticketId"][0] + err = api.SelfServiceProfile.RevokeTicket(context.Background(), ssop.GetID(), ticketID) + } + assert.NoError(t, err) } func TestSelfServiceProfileManager_MarshalJSON(t *testing.T) { @@ -147,6 +185,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{"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..8caba64a 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_rRN6NKjp1Xk3SoghgjovRx","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-06T19:41:31.394Z","updated_at":"2024-11-06T19:41:31.394Z","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: 1.290922208s - 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_rRN6NKjp1Xk3SoghgjovRx 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_rRN6NKjp1Xk3SoghgjovRx","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-06T19:41:31.394Z","updated_at":"2024-11-06T19:41:31.394Z","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: 437.787458ms - 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_rRN6NKjp1Xk3SoghgjovRx 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: 364.379833ms diff --git a/test/data/recordings/TestSelfServiceProfileManager_CreateTicket.yaml b/test/data/recordings/TestSelfServiceProfileManager_CreateAndRevokeTicket.yaml similarity index 66% rename from test/data/recordings/TestSelfServiceProfileManager_CreateTicket.yaml rename to test/data/recordings/TestSelfServiceProfileManager_CreateAndRevokeTicket.yaml index cd457272..633c3e2c 100644 --- a/test/data/recordings/TestSelfServiceProfileManager_CreateTicket.yaml +++ b/test/data/recordings/TestSelfServiceProfileManager_CreateAndRevokeTicket.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_b49fzgD4KpifFwcjHRHGUZ","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-06T19:41:53.127Z","updated_at":"2024-11-06T19:41:53.127Z","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: 418.79275ms - 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 7 01:11:53.163)","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 7 01:11:53.163)","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 7 01:11:53.163)","description":"This is just a test client.","client_id":"gneapOPWyHQd1V74TUujvupxgN7DtnHr","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_49aa13Y7XBtvEoh6B7pxwN","name":"Test Credential (Nov 7 01:11:53.163)","kid":"4e7yYf0TKdyTLbVnpq2wLN6mZ8t7eb9UJkMksyHj9iU","credential_type":"public_key","alg":"RS256","created_at":"2024-11-06T19:41:53.581Z","updated_at":"2024-11-06T19:41:53.581Z"}]}}}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 496.51ms + duration: 553.813583ms - 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-organization663","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,33 +102,33 @@ 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: '{"id":"org_rhKNJ9LILljaHbkL","display_name":"Test Organization","name":"test-organization663","branding":{"logo_url":"https://example.com/logo.gif"}}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 366.840083ms + duration: 415.160625ms - id: 3 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 178 + content_length: 480 transfer_encoding: [] trailer: {} host: go-auth0-dev.eu.auth0.com 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","display_name":"sso-generated-ticket-display-name","is_domain_connection":true,"show_as_button":true,"metadata":{"key1":"value1","key2":"value2"},"options":{"icon_url":"https://metabox.com/my_icon.jpeg","domain_aliases":["okta.com"]}},"enabled_clients":["gneapOPWyHQd1V74TUujvupxgN7DtnHr"],"enabled_organizations":[{"organization_id":"org_rhKNJ9LILljaHbkL","assign_membership_on_login":true,"show_as_button":true}],"ttl_sec":0} 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_b49fzgD4KpifFwcjHRHGUZ/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=1vJz1F68UUUKat7iZHLYBsfVP481VljX"}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 380.580875ms + duration: 435.449208ms - id: 4 request: proto: HTTP/1.1 @@ -162,8 +162,43 @@ 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/self-service-profiles/ssp_b49fzgD4KpifFwcjHRHGUZ/sso-ticket/1vJz1F68UUUKat7iZHLYBsfVP481VljX/revoke + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 2 + uncompressed: false + body: '{}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 202 Accepted + code: 202 + duration: 488.219667ms + - id: 5 + 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/organizations/org_rhKNJ9LILljaHbkL method: DELETE response: proto: HTTP/2.0 @@ -179,8 +214,8 @@ interactions: - application/json; charset=utf-8 status: 204 No Content code: 204 - duration: 350.997041ms - - id: 5 + duration: 366.146541ms + - id: 6 request: proto: HTTP/1.1 proto_major: 1 @@ -197,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/clients/8UJoAv2c7yghMFoPii3fMGwsUCCgplFG + - Go-Auth0/1.11.2 + url: https://go-auth0-dev.eu.auth0.com/api/v2/clients/gneapOPWyHQd1V74TUujvupxgN7DtnHr method: DELETE response: proto: HTTP/2.0 @@ -214,8 +249,8 @@ interactions: - application/json; charset=utf-8 status: 204 No Content code: 204 - duration: 414.216916ms - - id: 6 + duration: 441.780416ms + - id: 7 request: proto: HTTP/1.1 proto_major: 1 @@ -232,8 +267,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_b49fzgD4KpifFwcjHRHGUZ method: DELETE response: proto: HTTP/2.0 @@ -249,4 +284,4 @@ interactions: - application/json; charset=utf-8 status: 204 No Content code: 204 - duration: 318.091416ms + duration: 399.275208ms diff --git a/test/data/recordings/TestSelfServiceProfileManager_Delete.yaml b/test/data/recordings/TestSelfServiceProfileManager_Delete.yaml index 41b28384..103d7749 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_kRVNooW1CXsSWPmQ3nt47z","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-06T19:41:44.615Z","updated_at":"2024-11-06T19:41:44.615Z","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: 2.742884s - 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_kRVNooW1CXsSWPmQ3nt47z 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: 3.272491084s - 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_kRVNooW1CXsSWPmQ3nt47z 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_kRVNooW1CXsSWPmQ3nt47z not found"}' headers: Content-Type: - application/json; charset=utf-8 status: 404 Not Found code: 404 - duration: 350.736291ms + duration: 2.693900125s - 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_kRVNooW1CXsSWPmQ3nt47z 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: 393.546083ms diff --git a/test/data/recordings/TestSelfServiceProfileManager_List.yaml b/test/data/recordings/TestSelfServiceProfileManager_List.yaml index 1bdce433..3ce27658 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_2bVfcfqT4rsWXcCA2mbeM6","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-06T19:41:32.604Z","updated_at":"2024-11-06T19:41:32.604Z","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: 464.711417ms - 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_2bVfcfqT4rsWXcCA2mbeM6","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-06T19:41:32.604Z","updated_at":"2024-11-06T19:41:32.604Z","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: 390.826291ms - 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_2bVfcfqT4rsWXcCA2mbeM6 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: 368.053166ms diff --git a/test/data/recordings/TestSelfServiceProfileManager_Read.yaml b/test/data/recordings/TestSelfServiceProfileManager_Read.yaml index 2550f491..90d6339d 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_c3fLmJYCpM1ePJ4e1Aq5JR","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-06T19:41:33.783Z","updated_at":"2024-11-06T19:41:33.783Z","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: 359.438416ms - 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_c3fLmJYCpM1ePJ4e1Aq5JR 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_c3fLmJYCpM1ePJ4e1Aq5JR","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-06T19:41:33.783Z","updated_at":"2024-11-06T19:41:33.783Z","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: 405.539541ms - 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_c3fLmJYCpM1ePJ4e1Aq5JR 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: 553.023958ms diff --git a/test/data/recordings/TestSelfServiceProfileManager_SetGetCustomText.yaml b/test/data/recordings/TestSelfServiceProfileManager_SetGetCustomText.yaml new file mode 100644 index 00000000..be536476 --- /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_g8DfHGvRxQHrvYNPfA9PiE","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-06T19:41:51.341Z","updated_at":"2024-11-06T19:41:51.341Z","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: 349.985208ms + - 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_g8DfHGvRxQHrvYNPfA9PiE/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: 382.627667ms + - 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_g8DfHGvRxQHrvYNPfA9PiE/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: 407.142708ms + - 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_g8DfHGvRxQHrvYNPfA9PiE + 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: 628.272292ms diff --git a/test/data/recordings/TestSelfServiceProfileManager_Update.yaml b/test/data/recordings/TestSelfServiceProfileManager_Update.yaml index 0741751d..9e044eb8 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_pXsK5yP6h2XmXwiAoXYvdi","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-06T19:41:35.806Z","updated_at":"2024-11-06T19:41:35.806Z","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: 1.063988375s - 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_pXsK5yP6h2XmXwiAoXYvdi 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_pXsK5yP6h2XmXwiAoXYvdi","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-06T19:41:35.806Z","updated_at":"2024-11-06T19:41:38.728Z","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: 2.925993334s - 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_pXsK5yP6h2XmXwiAoXYvdi 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: 3.13637775s