diff --git a/management/management.gen.go b/management/management.gen.go index 80710146..b89c1b72 100644 --- a/management/management.gen.go +++ b/management/management.gen.go @@ -9514,6 +9514,111 @@ func (s *SCIMToken) String() string { return Stringify(s) } +// GetBranding returns the Branding field. +func (s *SelfServiceProfile) GetBranding() *Branding { + if s == nil { + return nil + } + return s.Branding +} + +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (s *SelfServiceProfile) GetCreatedAt() time.Time { + if s == nil || s.CreatedAt == nil { + return time.Time{} + } + return *s.CreatedAt +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (s *SelfServiceProfile) GetID() string { + if s == nil || s.ID == nil { + return "" + } + return *s.ID +} + +// 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 { + return time.Time{} + } + return *s.UpdatedAt +} + +// String returns a string representation of SelfServiceProfile. +func (s *SelfServiceProfile) String() string { + return Stringify(s) +} + +// GetConnectionConfig returns the ConnectionConfig field. +func (s *SelfServiceProfileTicket) GetConnectionConfig() *SelfServiceProfileTicketConnectionConfig { + if s == nil { + return nil + } + return s.ConnectionConfig +} + +// GetConnectionID returns the ConnectionID field if it's non-nil, zero value otherwise. +func (s *SelfServiceProfileTicket) GetConnectionID() string { + if s == nil || s.ConnectionID == nil { + return "" + } + return *s.ConnectionID +} + +// GetTicket returns the Ticket field if it's non-nil, zero value otherwise. +func (s *SelfServiceProfileTicket) GetTicket() string { + if s == nil || s.Ticket == nil { + return "" + } + return *s.Ticket +} + +// String returns a string representation of SelfServiceProfileTicket. +func (s *SelfServiceProfileTicket) String() string { + return Stringify(s) +} + +// String returns a string representation of SelfServiceProfileTicketConnectionConfig. +func (s *SelfServiceProfileTicketConnectionConfig) String() string { + return Stringify(s) +} + +// String returns a string representation of SelfServiceProfileTicketEnabledOrganizations. +func (s *SelfServiceProfileTicketEnabledOrganizations) String() string { + return Stringify(s) +} + +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (s *SelfServiceProfileUserAttributes) GetDescription() string { + if s == nil || s.Description == nil { + return "" + } + return *s.Description +} + +// GetIsOptional returns the IsOptional field if it's non-nil, zero value otherwise. +func (s *SelfServiceProfileUserAttributes) GetIsOptional() bool { + if s == nil || s.IsOptional == nil { + return false + } + return *s.IsOptional +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (s *SelfServiceProfileUserAttributes) GetName() string { + if s == nil || s.Name == nil { + return "" + } + return *s.Name +} + +// String returns a string representation of SelfServiceProfileUserAttributes. +func (s *SelfServiceProfileUserAttributes) String() string { + return Stringify(s) +} + // GetCredentials returns the Credentials field if it's non-nil, zero value otherwise. func (s *SelfSignedTLSClientAuth) GetCredentials() []Credential { if s == nil || s.Credentials == nil { diff --git a/management/management.gen_test.go b/management/management.gen_test.go index d7bfb33c..8b00c140 100644 --- a/management/management.gen_test.go +++ b/management/management.gen_test.go @@ -11955,6 +11955,140 @@ func TestSCIMToken_String(t *testing.T) { } } +func TestSelfServiceProfile_GetBranding(tt *testing.T) { + s := &SelfServiceProfile{} + s.GetBranding() + s = nil + s.GetBranding() +} + +func TestSelfServiceProfile_GetCreatedAt(tt *testing.T) { + var zeroValue time.Time + s := &SelfServiceProfile{CreatedAt: &zeroValue} + s.GetCreatedAt() + s = &SelfServiceProfile{} + s.GetCreatedAt() + s = nil + s.GetCreatedAt() +} + +func TestSelfServiceProfile_GetID(tt *testing.T) { + var zeroValue string + s := &SelfServiceProfile{ID: &zeroValue} + s.GetID() + s = &SelfServiceProfile{} + s.GetID() + s = nil + s.GetID() +} + +func TestSelfServiceProfile_GetUpdatedAt(tt *testing.T) { + var zeroValue time.Time + s := &SelfServiceProfile{UpdatedAt: &zeroValue} + s.GetUpdatedAt() + s = &SelfServiceProfile{} + s.GetUpdatedAt() + s = nil + s.GetUpdatedAt() +} + +func TestSelfServiceProfile_String(t *testing.T) { + var rawJSON json.RawMessage + v := &SelfServiceProfile{} + 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() + s = nil + s.GetConnectionConfig() +} + +func TestSelfServiceProfileTicket_GetConnectionID(tt *testing.T) { + var zeroValue string + s := &SelfServiceProfileTicket{ConnectionID: &zeroValue} + s.GetConnectionID() + s = &SelfServiceProfileTicket{} + s.GetConnectionID() + s = nil + s.GetConnectionID() +} + +func TestSelfServiceProfileTicket_GetTicket(tt *testing.T) { + var zeroValue string + s := &SelfServiceProfileTicket{Ticket: &zeroValue} + s.GetTicket() + s = &SelfServiceProfileTicket{} + s.GetTicket() + s = nil + s.GetTicket() +} + +func TestSelfServiceProfileTicket_String(t *testing.T) { + var rawJSON json.RawMessage + v := &SelfServiceProfileTicket{} + if err := json.Unmarshal([]byte(v.String()), &rawJSON); err != nil { + t.Errorf("failed to produce a valid json") + } +} + +func TestSelfServiceProfileTicketConnectionConfig_String(t *testing.T) { + var rawJSON json.RawMessage + v := &SelfServiceProfileTicketConnectionConfig{} + if err := json.Unmarshal([]byte(v.String()), &rawJSON); err != nil { + t.Errorf("failed to produce a valid json") + } +} + +func TestSelfServiceProfileTicketEnabledOrganizations_String(t *testing.T) { + var rawJSON json.RawMessage + v := &SelfServiceProfileTicketEnabledOrganizations{} + if err := json.Unmarshal([]byte(v.String()), &rawJSON); err != nil { + t.Errorf("failed to produce a valid json") + } +} + +func TestSelfServiceProfileUserAttributes_GetDescription(tt *testing.T) { + var zeroValue string + s := &SelfServiceProfileUserAttributes{Description: &zeroValue} + s.GetDescription() + s = &SelfServiceProfileUserAttributes{} + s.GetDescription() + s = nil + s.GetDescription() +} + +func TestSelfServiceProfileUserAttributes_GetIsOptional(tt *testing.T) { + var zeroValue bool + s := &SelfServiceProfileUserAttributes{IsOptional: &zeroValue} + s.GetIsOptional() + s = &SelfServiceProfileUserAttributes{} + s.GetIsOptional() + s = nil + s.GetIsOptional() +} + +func TestSelfServiceProfileUserAttributes_GetName(tt *testing.T) { + var zeroValue string + s := &SelfServiceProfileUserAttributes{Name: &zeroValue} + s.GetName() + s = &SelfServiceProfileUserAttributes{} + s.GetName() + s = nil + s.GetName() +} + +func TestSelfServiceProfileUserAttributes_String(t *testing.T) { + var rawJSON json.RawMessage + v := &SelfServiceProfileUserAttributes{} + if err := json.Unmarshal([]byte(v.String()), &rawJSON); err != nil { + t.Errorf("failed to produce a valid json") + } +} + func TestSelfSignedTLSClientAuth_GetCredentials(tt *testing.T) { var zeroValue []Credential s := &SelfSignedTLSClientAuth{Credentials: &zeroValue} diff --git a/management/management.go b/management/management.go index f4cf979e..46210af5 100644 --- a/management/management.go +++ b/management/management.go @@ -103,6 +103,9 @@ type Management struct { // EmailProvider manages Auth0 Email Providers. EmailProvider *EmailProviderManager + // SelfServiceProfileManager manages Auth0 Self Service Profiles. + SelfServiceProfile *SelfServiceProfileManager + url *url.URL basePath string userAgent string @@ -201,6 +204,7 @@ func New(domain string, options ...Option) (*Management, error) { m.Tenant = (*TenantManager)(&m.common) m.Ticket = (*TicketManager)(&m.common) m.User = (*UserManager)(&m.common) + m.SelfServiceProfile = (*SelfServiceProfileManager)(&m.common) return m, nil } diff --git a/management/self_service_profiles.go b/management/self_service_profiles.go new file mode 100644 index 00000000..adeb1cd1 --- /dev/null +++ b/management/self_service_profiles.go @@ -0,0 +1,120 @@ +package management + +import ( + "context" + "encoding/json" + "time" +) + +// SelfServiceProfile allows to configure SSO so that +// customers can independently set up +// SSO and sign in to your application. +type SelfServiceProfile struct { + ID *string `json:"id,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"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + + // Branding scheme for the profile. + Branding *Branding `json:"branding,omitempty"` +} + +// SelfServiceProfileUserAttributes is used to determine optional attributes. +type SelfServiceProfileUserAttributes struct { + // Identifier of this attribute. + Name *string `json:"name"` + + // Description of this attribute. + Description *string `json:"description"` + + // Determines if this attribute is required. + IsOptional *bool `json:"is_optional"` +} + +// 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 + // provided connection during the SSO Flow. + ConnectionID *string `json:"connection_id,omitempty"` + + // If provided, this will create a new connection + // for the SSO flow with the given configuration. + ConnectionConfig *SelfServiceProfileTicketConnectionConfig `json:"connection_config,omitempty"` + + // List of client_ids that the + // connection will be enabled for. + EnabledClients []*string `json:"enabled_clients,omitempty"` + + // List of organizations that the + // connection will be enabled for. + EnabledOrganizations []*SelfServiceProfileTicketEnabledOrganizations `json:"enabled_organizations,omitempty"` + + // The ticket that is generated. + Ticket *string `json:"ticket,omitempty"` +} + +// SelfServiceProfileTicketConnectionConfig sets the configuration for SSOTicket. +type SelfServiceProfileTicketConnectionConfig struct { + // The name of the connection that will be + // created as a part of the SSO flow. + Name string `json:"name,omitempty"` +} + +// SelfServiceProfileTicketEnabledOrganizations is the list of Organizations associated with the SSO Ticket. +type SelfServiceProfileTicketEnabledOrganizations struct { + // Organization identifier. + OrganizationID string `json:"organization_id,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"` + } + + return json.Marshal(&SelfServiceProfileSubset{ + UserAttributes: ssp.UserAttributes, + Branding: ssp.Branding, + }) +} + +// SelfServiceProfileManager manages Auth0 Self Service Profile resources. +type SelfServiceProfileManager manager + +// Create a new Self Service Profile. +func (m *SelfServiceProfileManager) Create(ctx context.Context, s *SelfServiceProfile, opts ...RequestOption) (err error) { + err = m.management.Request(ctx, "POST", m.management.URI("self-service-profiles"), &s, opts...) + return +} + +// List all Self Service Profiles. +func (m *SelfServiceProfileManager) List(ctx context.Context, opts ...RequestOption) (s []*SelfServiceProfile, err error) { + err = m.management.Request(ctx, "GET", m.management.URI("self-service-profiles"), &s, applyListDefaults(opts)) + return +} + +// Get a single Self Service Profile against the ID. +func (m *SelfServiceProfileManager) Read(ctx context.Context, id string, opts ...RequestOption) (s *SelfServiceProfile, err error) { + err = m.management.Request(ctx, "GET", m.management.URI("self-service-profiles", id), &s, opts...) + return +} + +// Update an existing Self Service Profile against the ID. +func (m *SelfServiceProfileManager) Update(ctx context.Context, id string, s *SelfServiceProfile, opts ...RequestOption) (err error) { + return m.management.Request(ctx, "PATCH", m.management.URI("self-service-profiles", id), s, opts...) +} + +// Delete a Self Service Profile against the ID. +func (m *SelfServiceProfileManager) Delete(ctx context.Context, id string, opts ...RequestOption) (err error) { + return m.management.Request(ctx, "DELETE", m.management.URI("self-service-profiles", id), nil, opts...) +} + +// 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 +} diff --git a/management/self_service_profiles_test.go b/management/self_service_profiles_test.go new file mode 100644 index 00000000..12cbe935 --- /dev/null +++ b/management/self_service_profiles_test.go @@ -0,0 +1,177 @@ +package management + +import ( + "context" + "encoding/json" + "net/http" + "testing" + "time" + + "github.com/stretchr/testify/assert" + + "github.com/auth0/go-auth0" +) + +func TestSelfServiceProfileManager_Create(t *testing.T) { + configureHTTPTestRecordings(t) + ssop := &SelfServiceProfile{ + Branding: &Branding{ + LogoURL: auth0.String("https://example.com/logo.png"), + Colors: &BrandingColors{ + Primary: auth0.String("#334455"), + }, + }, + UserAttributes: []*SelfServiceProfileUserAttributes{ + { + Name: auth0.String("some-name-here"), + Description: auth0.String("some-description"), + IsOptional: auth0.Bool(true), + }, + }, + } + + err := api.SelfServiceProfile.Create(context.Background(), ssop) + assert.NoError(t, err) + assert.NotEmpty(t, ssop.GetID()) + + ssopRetrieved, err := api.SelfServiceProfile.Read(context.Background(), ssop.GetID()) + assert.NoError(t, err) + assert.Equal(t, ssopRetrieved, ssop) + cleanSelfServiceProfile(t, ssop.GetID()) +} + +func TestSelfServiceProfileManager_List(t *testing.T) { + configureHTTPTestRecordings(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) +} + +func TestSelfServiceProfileManager_Read(t *testing.T) { + configureHTTPTestRecordings(t) + ssop := givenASelfServiceProfile(t) + ssopRetrieved, err := api.SelfServiceProfile.Read(context.Background(), ssop.GetID()) + assert.NoError(t, err) + assert.Equal(t, ssopRetrieved, ssop) +} + +func TestSelfServiceProfileManager_Update(t *testing.T) { + configureHTTPTestRecordings(t) + ssop := givenASelfServiceProfile(t) + ssopUpdated := &SelfServiceProfile{ + UserAttributes: []*SelfServiceProfileUserAttributes{ + { + Name: auth0.String("some-new-name-here"), + Description: auth0.String("some-description"), + IsOptional: auth0.Bool(true), + }, + }, + } + + err := api.SelfServiceProfile.Update(context.Background(), ssop.GetID(), ssopUpdated) + assert.NoError(t, err) + assert.NotEqual(t, ssop, ssopUpdated) + assert.Equal(t, ssop.GetID(), ssopUpdated.GetID()) + assert.Equal(t, ssop.GetBranding(), ssopUpdated.GetBranding()) + assert.Equal(t, ssop.UserAttributes[0].GetDescription(), ssopUpdated.UserAttributes[0].GetDescription()) + assert.Equal(t, ssop.UserAttributes[0].GetIsOptional(), ssopUpdated.UserAttributes[0].GetIsOptional()) +} + +func TestSelfServiceProfileManager_Delete(t *testing.T) { + configureHTTPTestRecordings(t) + ssop := givenASelfServiceProfile(t) + err := api.SelfServiceProfile.Delete(context.Background(), ssop.GetID()) + assert.NoError(t, err) + + retrievedProfile, err := api.SelfServiceProfile.Read(context.Background(), ssop.GetID()) + assert.Nil(t, retrievedProfile) + assert.Error(t, err) + assert.Implements(t, (*Error)(nil), err) + assert.Equal(t, http.StatusNotFound, err.(Error).Status()) +} + +func TestSelfServiceProfileManager_CreateTicket(t *testing.T) { + configureHTTPTestRecordings(t) + ssop := givenASelfServiceProfile(t) + client := givenAClient(t) + org := givenAnOrganization(t) + + ticket := &SelfServiceProfileTicket{ + ConnectionConfig: &SelfServiceProfileTicketConnectionConfig{ + Name: "sso-generated-ticket", + }, + EnabledClients: []*string{auth0.String(client.GetClientID())}, + EnabledOrganizations: []*SelfServiceProfileTicketEnabledOrganizations{ + { + org.GetID(), + }, + }, + } + err := api.SelfServiceProfile.CreateTicket(context.Background(), ssop.GetID(), ticket) + assert.NoError(t, err) + assert.NotEmpty(t, ticket.GetTicket()) +} + +func TestSelfServiceProfileManager_MarshalJSON(t *testing.T) { + for selfServiceProfile, expected := range map[*SelfServiceProfile]string{ + {}: `{}`, + { + UserAttributes: []*SelfServiceProfileUserAttributes{ + { + Name: auth0.String("some-name"), + Description: auth0.String("some-desc"), + IsOptional: auth0.Bool(true), + }, + }, + }: `{"user_attributes":[{"name":"some-name","description":"some-desc","is_optional":true}]}`, + { + Branding: &Branding{ + LogoURL: auth0.String("some-url"), + FaviconURL: auth0.String("some-favicon-url"), + }, + }: `{"branding":{"favicon_url":"some-favicon-url","logo_url":"some-url"}}`, + { + ID: auth0.String("some-id"), + CreatedAt: auth0.Time(time.Now()), + UpdatedAt: auth0.Time(time.Now()), + }: `{}`, + } { + payload, err := json.Marshal(selfServiceProfile) + assert.NoError(t, err) + assert.Equal(t, expected, string(payload)) + } +} + +func givenASelfServiceProfile(t *testing.T) *SelfServiceProfile { + t.Helper() + ssop := &SelfServiceProfile{ + Branding: &Branding{ + LogoURL: auth0.String("https://example.com/logo.png"), + Colors: &BrandingColors{ + Primary: auth0.String("#334455"), + }, + }, + UserAttributes: []*SelfServiceProfileUserAttributes{ + { + Name: auth0.String("some-name-here"), + Description: auth0.String("some-description"), + IsOptional: auth0.Bool(true), + }, + }, + } + + err := api.SelfServiceProfile.Create(context.Background(), ssop) + assert.NoError(t, err) + t.Cleanup(func() { + cleanSelfServiceProfile(t, ssop.GetID()) + }) + return ssop +} + +func cleanSelfServiceProfile(t *testing.T, id string) { + t.Helper() + err := api.SelfServiceProfile.Delete(context.Background(), id) + assert.NoError(t, err) +} diff --git a/test/data/recordings/TestSelfServiceProfileManager_Create.yaml b/test/data/recordings/TestSelfServiceProfileManager_Create.yaml new file mode 100644 index 00000000..5c7b4b86 --- /dev/null +++ b/test/data/recordings/TestSelfServiceProfileManager_Create.yaml @@ -0,0 +1,109 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 186 + 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"}} + 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 + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 299 + 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"}}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 1.047568167s + - id: 1 + 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.8.0 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_8z3r5eqUUVBBC1QyZdV5Xq + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + 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"}}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 410.606208ms + - 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.8.0 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_8z3r5eqUUVBBC1QyZdV5Xq + 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: 405.070709ms diff --git a/test/data/recordings/TestSelfServiceProfileManager_CreateTicket.yaml b/test/data/recordings/TestSelfServiceProfileManager_CreateTicket.yaml new file mode 100644 index 00000000..cd457272 --- /dev/null +++ b/test/data/recordings/TestSelfServiceProfileManager_CreateTicket.yaml @@ -0,0 +1,252 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 186 + 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"}} + 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 + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 299 + 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"}}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 931.360625ms + - id: 1 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 1125 + transfer_encoding: [] + trailer: {} + host: go-auth0-dev.eu.auth0.com + 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-----"}]}}} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0/1.8.0 + url: https://go-auth0-dev.eu.auth0.com/api/v2/clients + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + 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"}]}}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 496.51ms + - id: 2 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 122 + transfer_encoding: [] + trailer: {} + host: go-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"test-organization993","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 + url: https://go-auth0-dev.eu.auth0.com/api/v2/organizations + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + 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"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 366.840083ms + - id: 3 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 178 + 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"}]} + 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 + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 148 + uncompressed: false + body: '{"ticket":"https://go-auth0-dev.eu.auth0.com.sus.auth0.com/self-service/connections-flow?ticket=dOfSMtXcNhwmLBHzQxhOzuV4gBjfOD6d"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 380.580875ms + - id: 4 + 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.8.0 + url: https://go-auth0-dev.eu.auth0.com/api/v2/organizations/org_it30IT2ZYGJGlGE8 + 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: 350.997041ms + - 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.8.0 + url: https://go-auth0-dev.eu.auth0.com/api/v2/clients/8UJoAv2c7yghMFoPii3fMGwsUCCgplFG + 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: 414.216916ms + - id: 6 + 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.8.0 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_ataTXvZB8LN7V8WTA5MkGi + 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: 318.091416ms diff --git a/test/data/recordings/TestSelfServiceProfileManager_Delete.yaml b/test/data/recordings/TestSelfServiceProfileManager_Delete.yaml new file mode 100644 index 00000000..41b28384 --- /dev/null +++ b/test/data/recordings/TestSelfServiceProfileManager_Delete.yaml @@ -0,0 +1,144 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 186 + 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"}} + 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 + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 299 + 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"}}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 840.582833ms + - id: 1 + 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.8.0 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_5rVuEYmwYVsfZdeXWkBJGT + 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: 345.848333ms + - 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.8.0 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_5rVuEYmwYVsfZdeXWkBJGT + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"statusCode":404,"error":"Not Found","message":"Profile with ID: ssp_5rVuEYmwYVsfZdeXWkBJGT not found"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 404 Not Found + code: 404 + duration: 350.736291ms + - 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.8.0 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_5rVuEYmwYVsfZdeXWkBJGT + 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: 343.957583ms diff --git a/test/data/recordings/TestSelfServiceProfileManager_List.yaml b/test/data/recordings/TestSelfServiceProfileManager_List.yaml new file mode 100644 index 00000000..1bdce433 --- /dev/null +++ b/test/data/recordings/TestSelfServiceProfileManager_List.yaml @@ -0,0 +1,109 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 186 + 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"}} + 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 + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 299 + 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"}}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 364.893042ms + - id: 1 + 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.8.0 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles?include_totals=true&per_page=50 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + 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"}}}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 328.563042ms + - 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.8.0 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_qDHPZo3Num6pqrs3zJjpo5 + 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: 389.384ms diff --git a/test/data/recordings/TestSelfServiceProfileManager_Read.yaml b/test/data/recordings/TestSelfServiceProfileManager_Read.yaml new file mode 100644 index 00000000..2550f491 --- /dev/null +++ b/test/data/recordings/TestSelfServiceProfileManager_Read.yaml @@ -0,0 +1,109 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 186 + 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"}} + 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 + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 299 + 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"}}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 333.569334ms + - id: 1 + 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.8.0 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_5z7VgvtdZvRa2GKFgPubrV + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + 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"}}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 335.251209ms + - 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.8.0 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_5z7VgvtdZvRa2GKFgPubrV + 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: 326.430334ms diff --git a/test/data/recordings/TestSelfServiceProfileManager_Update.yaml b/test/data/recordings/TestSelfServiceProfileManager_Update.yaml new file mode 100644 index 00000000..0741751d --- /dev/null +++ b/test/data/recordings/TestSelfServiceProfileManager_Update.yaml @@ -0,0 +1,110 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 186 + 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"}} + 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 + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 299 + 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"}}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 812.088292ms + - id: 1 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 104 + transfer_encoding: [] + trailer: {} + host: go-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"user_attributes":[{"name":"some-new-name-here","description":"some-description","is_optional":true}]} + 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_ucmMn4kiwy3cVSbcqd12ab + method: PATCH + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + 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"}}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 326.74275ms + - 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.8.0 + url: https://go-auth0-dev.eu.auth0.com/api/v2/self-service-profiles/ssp_ucmMn4kiwy3cVSbcqd12ab + 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: 338.375875ms