Skip to content

Commit

Permalink
SDK-4929 flow vault connection update for app_id, added recordings
Browse files Browse the repository at this point in the history
  • Loading branch information
kushalshit27 committed Sep 13, 2024
1 parent 92dbd8c commit fbed5bb
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 45 deletions.
2 changes: 1 addition & 1 deletion management/flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ type FlowVaultConnectionList struct {
// MarshalJSON implements the json.Marshaller interface.
func (f *FlowVaultConnection) MarshalJSON() ([]byte, error) {
type FlowVaultConnectionSubset struct {
AppID *string `json:"appId,omitempty"`
AppID *string `json:"app_id,omitempty"`
Name *string `json:"name,omitempty"`
Setup *map[string]interface{} `json:"setup,omitempty"`
}
Expand Down
8 changes: 4 additions & 4 deletions management/flow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,11 @@ func TestFlowVaultConnectionManager_MarshalJSON(t *testing.T) {
Setup: &map[string]interface{}{
"key": "value",
},
}: `{"appId":"HTTP","name":"test-flow-vault-connection","setup":{"key":"value"}}`,
}: `{"app_id":"HTTP","name":"test-flow-vault-connection","setup":{"key":"value"}}`,
{
AppID: auth0.String("FTP"),
Name: auth0.String("ftp-flow-vault-connection"),
}: `{"appId":"FTP","name":"ftp-flow-vault-connection"}`,
AppID: auth0.String("AUTH0"),
Name: auth0.String("auth0-flow-vault-connection"),
}: `{"app_id":"AUTH0","name":"auth0-flow-vault-connection"}`,
{
ID: auth0.String("some-id"),
CreatedAt: auth0.Time(time.Now()),
Expand Down
12 changes: 6 additions & 6 deletions test/data/recordings/TestFlowVaultConnectionManager_Create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ interactions:
proto: HTTP/1.1
proto_major: 1
proto_minor: 1
content_length: 93
content_length: 94
transfer_encoding: []
trailer: {}
host: go-auth0-dev.eu.auth0.com
remote_addr: ""
request_uri: ""
body: |
{"appId":"HTTP","name":"test-vault-connection","setup":{"token":"my-token","type":"BEARER"}}
{"app_id":"HTTP","name":"test-vault-connection","setup":{"token":"my-token","type":"BEARER"}}
form: {}
headers:
Content-Type:
Expand All @@ -30,13 +30,13 @@ interactions:
trailer: {}
content_length: -1
uncompressed: true
body: '{"id":"ac_puuFJbSNUeBPZ9Yu3gVJnY","app_id":"HTTP","name":"test-vault-connection","account_name":"Bearer my-***ken","ready":true,"created_at":"2024-09-11T08:25:48.325Z","updated_at":"2024-09-11T08:25:48.325Z","fingerprint":"29d927aa13c635acd32b0013c7341857"}'
body: '{"id":"ac_ik8c7qvwKSSHsxdbfjoUN6","app_id":"HTTP","name":"test-vault-connection","account_name":"Bearer my-***ken","ready":true,"created_at":"2024-09-12T12:52:15.805Z","updated_at":"2024-09-12T12:52:15.805Z","fingerprint":"44078f05a47efb23da187165f5aada25"}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 200 OK
code: 200
duration: 628.159459ms
duration: 918.945875ms
- id: 1
request:
proto: HTTP/1.1
Expand All @@ -55,7 +55,7 @@ interactions:
- application/json
User-Agent:
- Go-Auth0/1.10.0
url: https://go-auth0-dev.eu.auth0.com/api/v2/flows/vault/connections/ac_puuFJbSNUeBPZ9Yu3gVJnY
url: https://go-auth0-dev.eu.auth0.com/api/v2/flows/vault/connections/ac_ik8c7qvwKSSHsxdbfjoUN6
method: DELETE
response:
proto: HTTP/2.0
Expand All @@ -71,4 +71,4 @@ interactions:
- application/json; charset=utf-8
status: 204 No Content
code: 204
duration: 284.984042ms
duration: 380.290334ms
16 changes: 8 additions & 8 deletions test/data/recordings/TestFlowVaultConnectionManager_Delete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ interactions:
proto: HTTP/1.1
proto_major: 1
proto_minor: 1
content_length: 48
content_length: 49
transfer_encoding: []
trailer: {}
host: go-auth0-dev.eu.auth0.com
remote_addr: ""
request_uri: ""
body: |
{"appId":"HTTP","name":"test-vault-connection"}
{"app_id":"HTTP","name":"test-vault-connection"}
form: {}
headers:
Content-Type:
Expand All @@ -30,13 +30,13 @@ interactions:
trailer: {}
content_length: -1
uncompressed: true
body: '{"id":"ac_8aUEJF51FKmqdGXaGD2jNi","app_id":"HTTP","name":"test-vault-connection","ready":false,"created_at":"2024-09-11T08:25:50.393Z","updated_at":"2024-09-11T08:25:50.393Z","refreshed_at":null,"fingerprint":"e3448d3b9c2cedfd57686630cb1f0e06"}'
body: '{"id":"ac_faf7YF2FwNxHdXT8BCnJih","app_id":"HTTP","name":"test-vault-connection","ready":false,"created_at":"2024-09-12T12:52:18.770Z","updated_at":"2024-09-12T12:52:18.770Z","refreshed_at":null,"fingerprint":"afdcf7ae0431402bd79eb8a4f3bc3f4a"}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 200 OK
code: 200
duration: 220.164291ms
duration: 327.585875ms
- id: 1
request:
proto: HTTP/1.1
Expand All @@ -55,7 +55,7 @@ interactions:
- application/json
User-Agent:
- Go-Auth0/1.10.0
url: https://go-auth0-dev.eu.auth0.com/api/v2/flows/vault/connections/ac_8aUEJF51FKmqdGXaGD2jNi
url: https://go-auth0-dev.eu.auth0.com/api/v2/flows/vault/connections/ac_faf7YF2FwNxHdXT8BCnJih
method: DELETE
response:
proto: HTTP/2.0
Expand All @@ -71,7 +71,7 @@ interactions:
- application/json; charset=utf-8
status: 204 No Content
code: 204
duration: 224.422875ms
duration: 366.0705ms
- id: 2
request:
proto: HTTP/1.1
Expand All @@ -90,7 +90,7 @@ interactions:
- application/json
User-Agent:
- Go-Auth0/1.10.0
url: https://go-auth0-dev.eu.auth0.com/api/v2/flows/vault/connections/ac_8aUEJF51FKmqdGXaGD2jNi
url: https://go-auth0-dev.eu.auth0.com/api/v2/flows/vault/connections/ac_faf7YF2FwNxHdXT8BCnJih
method: DELETE
response:
proto: HTTP/2.0
Expand All @@ -106,4 +106,4 @@ interactions:
- application/json; charset=utf-8
status: 404 Not Found
code: 404
duration: 286.848ms
duration: 325.472834ms
16 changes: 8 additions & 8 deletions test/data/recordings/TestFlowVaultConnectionManager_List.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ interactions:
proto: HTTP/1.1
proto_major: 1
proto_minor: 1
content_length: 48
content_length: 49
transfer_encoding: []
trailer: {}
host: go-auth0-dev.eu.auth0.com
remote_addr: ""
request_uri: ""
body: |
{"appId":"HTTP","name":"test-vault-connection"}
{"app_id":"HTTP","name":"test-vault-connection"}
form: {}
headers:
Content-Type:
Expand All @@ -30,13 +30,13 @@ interactions:
trailer: {}
content_length: -1
uncompressed: true
body: '{"id":"ac_2KU5xHwQ19BK39BtNRFoyt","app_id":"HTTP","name":"test-vault-connection","ready":false,"created_at":"2024-09-11T08:25:51.162Z","updated_at":"2024-09-11T08:25:51.162Z","refreshed_at":null,"fingerprint":"4fc6860667cadb9904961288e46ad225"}'
body: '{"id":"ac_t9JToPSSZ4deNc6qPXZ9B9","app_id":"HTTP","name":"test-vault-connection","ready":false,"created_at":"2024-09-12T12:52:19.790Z","updated_at":"2024-09-12T12:52:19.790Z","refreshed_at":null,"fingerprint":"525eccf582f7913f5383ff4b3332ca7c"}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 200 OK
code: 200
duration: 265.499542ms
duration: 319.718375ms
- id: 1
request:
proto: HTTP/1.1
Expand Down Expand Up @@ -65,13 +65,13 @@ interactions:
trailer: {}
content_length: -1
uncompressed: true
body: '{"limit":50,"start":0,"total":5,"connections":[{"id":"ac_bX9wyzE6DHumj2gJmc2vje","name":"Auth0 test","app_id":"AUTH0","ready":true,"account_name":"go-auth0-dev.eu.auth0.com.eu.auth0.com","created_at":"2024-08-12T12:42:36.419Z","updated_at":"2024-08-12T12:42:36.419Z","fingerprint":"798d8de90253962c2639c7037a3af087"},{"id":"ac_5Cy8N47rNvNixgNBShK8fT","name":"HTTP #1","app_id":"HTTP","ready":true,"account_name":"Bearer ***","created_at":"2024-09-02T06:53:06.758Z","updated_at":"2024-09-02T06:53:06.758Z","fingerprint":"fe77deec2f6cbdf38b7614266c6d83fe"},{"id":"ac_ayGXUNMVsECPVkfqnVZeAw","name":"HTTP new create","app_id":"HTTP","ready":true,"account_name":"Bearer ***","created_at":"2024-09-11T04:38:59.120Z","updated_at":"2024-09-11T04:38:59.120Z","fingerprint":"11b274dc3438f13b8b87fe346a56c9bd"},{"id":"ac_uBEatoBijKsmGKoxFBjrb5","name":"REPLACE_WITH_M2M_CONNECTION","app_id":"AUTH0","ready":false,"created_at":"2024-08-21T04:25:42.001Z","updated_at":"2024-08-21T04:25:42.001Z","fingerprint":"71ce79d94826d077646a45d209b4cb0b"},{"id":"ac_2KU5xHwQ19BK39BtNRFoyt","name":"test-vault-connection","app_id":"HTTP","ready":false,"created_at":"2024-09-11T08:25:51.162Z","updated_at":"2024-09-11T08:25:51.162Z","fingerprint":"4fc6860667cadb9904961288e46ad225"}]}'
body: '{"limit":50,"start":0,"total":1,"connections":[{"id":"ac_t9JToPSSZ4deNc6qPXZ9B9","name":"test-vault-connection","app_id":"HTTP","ready":false,"created_at":"2024-09-12T12:52:19.790Z","updated_at":"2024-09-12T12:52:19.790Z","fingerprint":"525eccf582f7913f5383ff4b3332ca7c"}]}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 200 OK
code: 200
duration: 220.356042ms
duration: 325.612458ms
- id: 2
request:
proto: HTTP/1.1
Expand All @@ -90,7 +90,7 @@ interactions:
- application/json
User-Agent:
- Go-Auth0/1.10.0
url: https://go-auth0-dev.eu.auth0.com/api/v2/flows/vault/connections/ac_2KU5xHwQ19BK39BtNRFoyt
url: https://go-auth0-dev.eu.auth0.com/api/v2/flows/vault/connections/ac_t9JToPSSZ4deNc6qPXZ9B9
method: DELETE
response:
proto: HTTP/2.0
Expand All @@ -106,4 +106,4 @@ interactions:
- application/json; charset=utf-8
status: 204 No Content
code: 204
duration: 232.499041ms
duration: 426.515459ms
18 changes: 9 additions & 9 deletions test/data/recordings/TestFlowVaultConnectionManager_Read.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ interactions:
proto: HTTP/1.1
proto_major: 1
proto_minor: 1
content_length: 48
content_length: 49
transfer_encoding: []
trailer: {}
host: go-auth0-dev.eu.auth0.com
remote_addr: ""
request_uri: ""
body: |
{"appId":"HTTP","name":"test-vault-connection"}
{"app_id":"HTTP","name":"test-vault-connection"}
form: {}
headers:
Content-Type:
Expand All @@ -30,13 +30,13 @@ interactions:
trailer: {}
content_length: -1
uncompressed: true
body: '{"id":"ac_iWFurRgbwci3ahcAmKEPQo","app_id":"HTTP","name":"test-vault-connection","ready":false,"created_at":"2024-09-11T08:25:48.866Z","updated_at":"2024-09-11T08:25:48.866Z","refreshed_at":null,"fingerprint":"3200a4f67605ae5c1a9ce15cdfbf44ca"}'
body: '{"id":"ac_bz9Ds2yxVLGsLmP1R68Kmv","app_id":"HTTP","name":"test-vault-connection","ready":false,"created_at":"2024-09-12T12:52:16.553Z","updated_at":"2024-09-12T12:52:16.553Z","refreshed_at":null,"fingerprint":"e5a6d604e16b993f46f3c52be398906b"}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 200 OK
code: 200
duration: 246.23ms
duration: 356.341ms
- id: 1
request:
proto: HTTP/1.1
Expand All @@ -55,7 +55,7 @@ interactions:
- application/json
User-Agent:
- Go-Auth0/1.10.0
url: https://go-auth0-dev.eu.auth0.com/api/v2/flows/vault/connections/ac_iWFurRgbwci3ahcAmKEPQo
url: https://go-auth0-dev.eu.auth0.com/api/v2/flows/vault/connections/ac_bz9Ds2yxVLGsLmP1R68Kmv
method: GET
response:
proto: HTTP/2.0
Expand All @@ -65,13 +65,13 @@ interactions:
trailer: {}
content_length: -1
uncompressed: true
body: '{"id":"ac_iWFurRgbwci3ahcAmKEPQo","app_id":"HTTP","name":"test-vault-connection","ready":false,"created_at":"2024-09-11T08:25:48.866Z","updated_at":"2024-09-11T08:25:48.866Z","fingerprint":"3200a4f67605ae5c1a9ce15cdfbf44ca"}'
body: '{"id":"ac_bz9Ds2yxVLGsLmP1R68Kmv","app_id":"HTTP","name":"test-vault-connection","ready":false,"created_at":"2024-09-12T12:52:16.553Z","updated_at":"2024-09-12T12:52:16.553Z","fingerprint":"e5a6d604e16b993f46f3c52be398906b"}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 200 OK
code: 200
duration: 267.440667ms
duration: 340.83575ms
- id: 2
request:
proto: HTTP/1.1
Expand All @@ -90,7 +90,7 @@ interactions:
- application/json
User-Agent:
- Go-Auth0/1.10.0
url: https://go-auth0-dev.eu.auth0.com/api/v2/flows/vault/connections/ac_iWFurRgbwci3ahcAmKEPQo
url: https://go-auth0-dev.eu.auth0.com/api/v2/flows/vault/connections/ac_bz9Ds2yxVLGsLmP1R68Kmv
method: DELETE
response:
proto: HTTP/2.0
Expand All @@ -106,4 +106,4 @@ interactions:
- application/json; charset=utf-8
status: 204 No Content
code: 204
duration: 329.993166ms
duration: 378.442042ms
18 changes: 9 additions & 9 deletions test/data/recordings/TestFlowVaultConnectionManager_Update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ interactions:
proto: HTTP/1.1
proto_major: 1
proto_minor: 1
content_length: 48
content_length: 49
transfer_encoding: []
trailer: {}
host: go-auth0-dev.eu.auth0.com
remote_addr: ""
request_uri: ""
body: |
{"appId":"HTTP","name":"test-vault-connection"}
{"app_id":"HTTP","name":"test-vault-connection"}
form: {}
headers:
Content-Type:
Expand All @@ -30,13 +30,13 @@ interactions:
trailer: {}
content_length: -1
uncompressed: true
body: '{"id":"ac_kxctJqTodoApL6MGB1ooy6","app_id":"HTTP","name":"test-vault-connection","ready":false,"created_at":"2024-09-11T08:25:49.699Z","updated_at":"2024-09-11T08:25:49.699Z","refreshed_at":null,"fingerprint":"3552d94e98c34d47d48c8666a72562e3"}'
body: '{"id":"ac_6t5kdaPvkcH3WQ6BnELSDa","app_id":"HTTP","name":"test-vault-connection","ready":false,"created_at":"2024-09-12T12:52:17.605Z","updated_at":"2024-09-12T12:52:17.605Z","refreshed_at":null,"fingerprint":"af9152e9fc291c0a4c364c8755753ad2"}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 200 OK
code: 200
duration: 226.496125ms
duration: 409.098667ms
- id: 1
request:
proto: HTTP/1.1
Expand All @@ -56,7 +56,7 @@ interactions:
- application/json
User-Agent:
- Go-Auth0/1.10.0
url: https://go-auth0-dev.eu.auth0.com/api/v2/flows/vault/connections/ac_kxctJqTodoApL6MGB1ooy6
url: https://go-auth0-dev.eu.auth0.com/api/v2/flows/vault/connections/ac_6t5kdaPvkcH3WQ6BnELSDa
method: PATCH
response:
proto: HTTP/2.0
Expand All @@ -66,13 +66,13 @@ interactions:
trailer: {}
content_length: -1
uncompressed: true
body: '{"id":"ac_kxctJqTodoApL6MGB1ooy6","app_id":"HTTP","name":"new-connection-name","ready":false,"created_at":"2024-09-11T08:25:49.699Z","updated_at":"2024-09-11T08:25:49.944Z","refreshed_at":null,"fingerprint":"8fd2a19f4c87d40c8d7e3ebd80f2ca4d"}'
body: '{"id":"ac_6t5kdaPvkcH3WQ6BnELSDa","app_id":"HTTP","name":"new-connection-name","ready":false,"created_at":"2024-09-12T12:52:17.605Z","updated_at":"2024-09-12T12:52:18.049Z","refreshed_at":null,"fingerprint":"6724a8a63ea2e97f62af6e378f93a0ba"}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 200 OK
code: 200
duration: 254.676667ms
duration: 411.437125ms
- id: 2
request:
proto: HTTP/1.1
Expand All @@ -91,7 +91,7 @@ interactions:
- application/json
User-Agent:
- Go-Auth0/1.10.0
url: https://go-auth0-dev.eu.auth0.com/api/v2/flows/vault/connections/ac_kxctJqTodoApL6MGB1ooy6
url: https://go-auth0-dev.eu.auth0.com/api/v2/flows/vault/connections/ac_6t5kdaPvkcH3WQ6BnELSDa
method: DELETE
response:
proto: HTTP/2.0
Expand All @@ -107,4 +107,4 @@ interactions:
- application/json; charset=utf-8
status: 204 No Content
code: 204
duration: 214.271916ms
duration: 355.213041ms

0 comments on commit fbed5bb

Please sign in to comment.