auth0 5.0.1 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +3 -5
  3. data/CHANGELOG.md +46 -0
  4. data/README.md +81 -1
  5. data/auth0.gemspec +6 -6
  6. data/lib/auth0/api/authentication_endpoints.rb +16 -6
  7. data/lib/auth0/api/v2.rb +8 -4
  8. data/lib/auth0/api/v2/branding.rb +66 -0
  9. data/lib/auth0/api/v2/connections.rb +8 -2
  10. data/lib/auth0/api/v2/device_credentials.rb +3 -3
  11. data/lib/auth0/api/v2/jobs.rb +3 -1
  12. data/lib/auth0/api/v2/organizations.rb +335 -0
  13. data/lib/auth0/api/v2/tickets.rb +14 -2
  14. data/lib/auth0/api/v2/users.rb +12 -0
  15. data/lib/auth0/exception.rb +3 -1
  16. data/lib/auth0/mixins/httpproxy.rb +4 -1
  17. data/lib/auth0/mixins/initializer.rb +3 -1
  18. data/lib/auth0/mixins/validation.rb +14 -0
  19. data/lib/auth0/version.rb +1 -1
  20. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_connection/_filters/should_exclude_the_fields_indicated.yml +38 -26
  21. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_connection/_filters/should_include_the_fields_indicated.yml +38 -24
  22. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_connection/should_find_the_correct_connection.yml +38 -26
  23. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_connections/_filters/should_include_previously-created_connection_when_filtered.yml +41 -21
  24. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_connections/_filters/should_should_exclude_the_fields_indicated_from_filtered_results.yml +41 -21
  25. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_connections/_filters/should_should_include_the_fields_indicated_from_filtered_results.yml +41 -21
  26. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_connections/should_include_the_previously_created_connection.yml +41 -21
  27. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_connections/should_not_be_empty.yml +41 -21
  28. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_delete_connection/should_delete_the_connection.yml +45 -24
  29. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_delete_connection_user/should_delete_the_user_created.yml +75 -39
  30. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_update_connection/should_update_the_connection.yml +39 -28
  31. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/create_test_connection.yml +37 -25
  32. data/spec/lib/auth0/api/v2/branding_spec.rb +70 -0
  33. data/spec/lib/auth0/api/v2/connections_spec.rb +5 -1
  34. data/spec/lib/auth0/api/v2/device_credentials_spec.rb +2 -2
  35. data/spec/lib/auth0/api/v2/jobs_spec.rb +11 -0
  36. data/spec/lib/auth0/api/v2/organizations_spec.rb +593 -0
  37. data/spec/lib/auth0/api/v2/tickets_spec.rb +55 -0
  38. data/spec/lib/auth0/api/v2/users_spec.rb +19 -0
  39. data/spec/lib/auth0/client_spec.rb +79 -9
  40. data/spec/lib/auth0/mixins/httpproxy_spec.rb +8 -8
  41. data/spec/lib/auth0/mixins/validation_spec.rb +32 -0
  42. metadata +21 -15
@@ -12,50 +12,70 @@ http_interactions:
12
12
  Accept-Encoding:
13
13
  - gzip, deflate
14
14
  User-Agent:
15
- - Ruby/2.5.1
15
+ - rest-client/2.0.2 (darwin20.2.0 x86_64) ruby/2.7.2p137
16
16
  Content-Type:
17
17
  - application/json
18
18
  Auth0-Client:
19
- - eyJuYW1lIjoicnVieS1hdXRoMCIsInZlcnNpb24iOiI0LjUuMCJ9
19
+ - eyJuYW1lIjoicnVieS1hdXRoMCIsInZlcnNpb24iOiI1LjEuMiIsImVudiI6eyJydWJ5IjoiMi43LjIifX0=
20
20
  Authorization:
21
21
  - Bearer API_TOKEN
22
- Host:
23
- - auth0-sdk-tests.auth0.com
24
22
  response:
25
23
  status:
26
24
  code: 200
27
25
  message: OK
28
26
  headers:
29
27
  Date:
30
- - Thu, 04 Oct 2018 15:41:06 GMT
28
+ - Tue, 20 Jul 2021 02:14:51 GMT
31
29
  Content-Type:
32
30
  - application/json; charset=utf-8
33
31
  Transfer-Encoding:
34
32
  - chunked
35
33
  Connection:
36
34
  - keep-alive
37
- X-Ratelimit-Limit:
38
- - '10'
39
- X-Ratelimit-Remaining:
40
- - '3'
41
- X-Ratelimit-Reset:
42
- - '1538667671'
43
- Vary:
44
- - origin,accept-encoding
35
+ Cf-Ray:
36
+ - 6718adab19a642b6-LAX
45
37
  Cache-Control:
46
- - private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
38
+ - no-cache
47
39
  Content-Encoding:
48
40
  - gzip
41
+ Link:
42
+ - <http://auth0-sdk-tests.auth0.com/api/v2/connections?page=0&per_page=50>;
43
+ rel="first", <http://auth0-sdk-tests.auth0.com/api/v2/connections?page=0&per_page=50>;
44
+ rel="last"
49
45
  Strict-Transport-Security:
50
- - max-age=15724800
51
- X-Robots-Tag:
52
- - noindex, nofollow, nosnippet, noarchive
46
+ - max-age=31536000
47
+ Vary:
48
+ - origin,accept-encoding
49
+ Cf-Cache-Status:
50
+ - DYNAMIC
51
+ Expect-Ct:
52
+ - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
53
+ Ot-Baggage-Auth0-Request-Id:
54
+ - 6718adab19a642b6
55
+ Ot-Tracer-Sampled:
56
+ - 'true'
57
+ Ot-Tracer-Spanid:
58
+ - 5ad493b861f7eff2
59
+ Ot-Tracer-Traceid:
60
+ - 452b6f063c800f3d
61
+ X-Content-Type-Options:
62
+ - nosniff
63
+ X-Ratelimit-Limit:
64
+ - '50'
65
+ X-Ratelimit-Remaining:
66
+ - '49'
67
+ X-Ratelimit-Reset:
68
+ - '1626747292'
69
+ Server:
70
+ - cloudflare
71
+ Alt-Svc:
72
+ - h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443";
73
+ ma=86400
53
74
  body:
54
75
  encoding: ASCII-8BIT
55
76
  string: !binary |-
56
- H4sIAAAAAAAAA+2TXXOaQBSG/wvXZmb5qF93iIqKWoyiYMZhlmXBTZAFdsFgJv+9S9IktdNOO9NOr3oFc87Lu4f3PHv3JJFQ6kuIpr4FFuZIJe4mxHBhZZrUkmjGCU2Z1H+SThFsHhBxUmGpz4sSt6QC87JIfZwWNEl8hjknacxeu88tKYOMnWkR2jQhqBbHxJSGwjYoSo79iBYI+1lBOUbNMW+mjBeQ47j2K1ywl7ry/FEVLrDkRyBsUngSk0gbzLhB0/TV5aYog5qLkhAQ5of0BEnqo/e+1I9gwl5mh8lJzHr3U4NDS8IpDBIc+ighOOWN+vDc+iYz91GzipLCAGjnKvHcP8/s72bjMFw0rzf211Xc6EIgfoUg+OL72yH90umHaUmqcV51lfochfluSWRbhpHehvfhZOyZR23KxABqrk+dpGsuQtOVKxQU+/2DMg2Vy9wZw12nJyQDjdqTBIDOFsrmINy7ZD2BI8PJt7uHsOc+CInBHE1W510eOcTKY/h5YJCRTj0I+OrWAKqQmIuluwYGj05tbZZtVztrdukoxvLoTIiprwIh2YYz8CkGlVwPgBPmZGgN5nrkPC5zeaCgSXMn0HCWo3hi2N2M5vt6GHnyEVjOeNquLvamFzXhZ2B0W3bMyZguwY7s5nownkbL+/XFs8YM1EKSX4KhymZ1ufEMxVWneq5UyFM7iY3C3gY0IF1u7QGCUemMlwuo5Wzmre6j0No7oLdPOutcukbR7sENaI/iagM6eIp21yhiseHkjSLBVUSSdyIZohlulvUq+ugfrtkStzdO8A1tGFM+GPu+/JtAXX/2n55/T8/hC1zkMgH+BQAA
57
- http_version:
58
- recorded_at: Thu, 04 Oct 2018 15:41:06 GMT
77
+ H4sIAAAAAAAAA+1Y2W7jSLL9lYGfy13cl36jFkoiJW4iKYqNhsCdFHcm98H8+2XKdlfZ3YXuQc3ThWFAliJPZkSciIzMjN/+/ZT4T78+eWVxa479udcIwoxBI5fo5unLU1m1SVmAp1///R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VXisWdNkk80sP5H+q5W3p4On9Q71MfO/b+zwNpgx2Zf7mZf7ojzng5nZt+514CUGVOdPtT4t9e8m/yf5Bk+KU5fhplDWyay30cu7fp3oeOvDfozv1RwuxCdqugcQ1ZZbdQNC2SRGBP/oTi31Q5Q0kUdFV37V1ABjKxlfKLPFemxf+0zeWbktWgYf7GFRRd0kTLLm+hO3F0ddl3KZrg1tYNl4A243tG2d/bo44ryn7ypMegPaf90Ie6H9AX8GcBAQbMRsgwsq4SD9P33/F00+xsf6DgOemc6f2vyborxb4Qdvo7w7A96xaIyE2Xem4CDH02dX6eVb/t+wZr1n5rLwG6xnWx8XZ127sP6fxb1f6bMN9tuE+23CfbbjPNtxnG+6zDffZhvtsw3224T7bcJ9tuP+vbbjf/w+oh9snMycAAA==
78
+ recorded_at: Tue, 20 Jul 2021 02:14:51 GMT
59
79
  - request:
60
80
  method: delete
61
81
  uri: https://auth0-sdk-tests.auth0.com/api/v2/connections/con_Xx4Kruoab04wvlYX/users?email=rubytest-rubytest-username@auth0.com
@@ -68,43 +88,59 @@ http_interactions:
68
88
  Accept-Encoding:
69
89
  - gzip, deflate
70
90
  User-Agent:
71
- - Ruby/2.5.1
91
+ - rest-client/2.0.2 (darwin20.2.0 x86_64) ruby/2.7.2p137
72
92
  Content-Type:
73
93
  - application/json
74
94
  Auth0-Client:
75
- - eyJuYW1lIjoicnVieS1hdXRoMCIsInZlcnNpb24iOiI0LjUuMCJ9
95
+ - eyJuYW1lIjoicnVieS1hdXRoMCIsInZlcnNpb24iOiI1LjEuMiIsImVudiI6eyJydWJ5IjoiMi43LjIifX0=
76
96
  Authorization:
77
97
  - Bearer API_TOKEN
78
- Host:
79
- - auth0-sdk-tests.auth0.com
80
98
  response:
81
99
  status:
82
100
  code: 204
83
101
  message: No Content
84
102
  headers:
85
103
  Date:
86
- - Thu, 04 Oct 2018 15:41:07 GMT
104
+ - Tue, 20 Jul 2021 02:14:51 GMT
87
105
  Content-Type:
88
106
  - application/json; charset=utf-8
89
107
  Connection:
90
108
  - keep-alive
109
+ Cf-Ray:
110
+ - 6718adacca2242b7-LAX
111
+ Cache-Control:
112
+ - no-cache
113
+ Strict-Transport-Security:
114
+ - max-age=31536000
115
+ Vary:
116
+ - origin,accept-encoding
117
+ Cf-Cache-Status:
118
+ - DYNAMIC
119
+ Expect-Ct:
120
+ - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
121
+ Ot-Baggage-Auth0-Request-Id:
122
+ - 6718adacca2242b7
123
+ Ot-Tracer-Sampled:
124
+ - 'true'
125
+ Ot-Tracer-Spanid:
126
+ - 6000ff4e6cf602a8
127
+ Ot-Tracer-Traceid:
128
+ - 6130cf9358b2cbdd
129
+ X-Content-Type-Options:
130
+ - nosniff
91
131
  X-Ratelimit-Limit:
92
- - '10'
132
+ - '50'
93
133
  X-Ratelimit-Remaining:
94
- - '2'
134
+ - '49'
95
135
  X-Ratelimit-Reset:
96
- - '1538667672'
97
- Vary:
98
- - origin,accept-encoding
99
- Cache-Control:
100
- - private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
101
- Strict-Transport-Security:
102
- - max-age=15724800
103
- X-Robots-Tag:
104
- - noindex, nofollow, nosnippet, noarchive
136
+ - '1626747292'
137
+ Server:
138
+ - cloudflare
139
+ Alt-Svc:
140
+ - h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443";
141
+ ma=86400
105
142
  body:
106
143
  encoding: UTF-8
107
144
  string: ''
108
- http_version:
109
- recorded_at: Thu, 04 Oct 2018 15:41:07 GMT
110
- recorded_with: VCR 3.0.3
145
+ recorded_at: Tue, 20 Jul 2021 02:14:51 GMT
146
+ recorded_with: VCR 6.0.0
@@ -2,65 +2,76 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: patch
5
- uri: https://auth0-sdk-tests.auth0.com/api/v2/connections/con_LW7vB80FsVmRF4fN
5
+ uri: https://auth0-sdk-tests.auth0.com/api/v2/connections/con_n8MJ02x2Zs0JBUWN?email=rubytest-rubytest-username@auth0.com
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"excellent","brute_force_protection":true,"strategy_version":2}}'
8
+ string: '{"options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"excellent","strategy_version":2,"brute_force_protection":true}}'
9
9
  headers:
10
10
  Accept:
11
11
  - "*/*"
12
12
  Accept-Encoding:
13
13
  - gzip, deflate
14
14
  User-Agent:
15
- - Ruby/2.3.1
15
+ - rest-client/2.0.2 (darwin20.2.0 x86_64) ruby/2.7.2p137
16
16
  Content-Type:
17
17
  - application/json
18
18
  Auth0-Client:
19
- - eyJuYW1lIjoicnVieS1hdXRoMCIsInZlcnNpb24iOiI0LjUuMCJ9
19
+ - eyJuYW1lIjoicnVieS1hdXRoMCIsInZlcnNpb24iOiI1LjEuMiIsImVudiI6eyJydWJ5IjoiMi43LjIifX0=
20
20
  Authorization:
21
21
  - Bearer API_TOKEN
22
22
  Content-Length:
23
23
  - '145'
24
- Host:
25
- - auth0-sdk-tests.auth0.com
26
24
  response:
27
25
  status:
28
26
  code: 200
29
27
  message: OK
30
28
  headers:
31
29
  Date:
32
- - Fri, 05 Oct 2018 20:17:17 GMT
30
+ - Tue, 20 Jul 2021 02:14:52 GMT
33
31
  Content-Type:
34
32
  - application/json; charset=utf-8
35
33
  Transfer-Encoding:
36
34
  - chunked
37
35
  Connection:
38
36
  - keep-alive
39
- X-Ratelimit-Limit:
40
- - '10'
41
- X-Ratelimit-Remaining:
42
- - '7'
43
- X-Ratelimit-Reset:
44
- - '1538770640'
45
- Vary:
46
- - origin,accept-encoding
37
+ Cf-Ray:
38
+ - 6718adae6d5fd392-LAX
47
39
  Cache-Control:
48
- - private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
40
+ - no-cache
49
41
  Content-Encoding:
50
42
  - gzip
51
43
  Strict-Transport-Security:
52
- - max-age=15724800
53
- X-Robots-Tag:
54
- - noindex, nofollow, nosnippet, noarchive
44
+ - max-age=31536000
45
+ Vary:
46
+ - origin,accept-encoding
47
+ Cf-Cache-Status:
48
+ - DYNAMIC
49
+ Expect-Ct:
50
+ - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
51
+ Ot-Baggage-Auth0-Request-Id:
52
+ - 6718adae6d5fd392
53
+ Ot-Tracer-Sampled:
54
+ - 'true'
55
+ Ot-Tracer-Spanid:
56
+ - '01528db6466cb119'
57
+ Ot-Tracer-Traceid:
58
+ - 16b32c893374bd64
59
+ X-Content-Type-Options:
60
+ - nosniff
61
+ X-Ratelimit-Limit:
62
+ - '50'
63
+ X-Ratelimit-Remaining:
64
+ - '49'
65
+ X-Ratelimit-Reset:
66
+ - '1626747293'
67
+ Server:
68
+ - cloudflare
69
+ Alt-Svc:
70
+ - h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443";
71
+ ma=86400
55
72
  body:
56
73
  encoding: ASCII-8BIT
57
74
  string: !binary |-
58
- H4sIAAAAAAAAA3WPQUvEQAyF/0vOFRYRlB4V9iQiInqQZUin6Towk5QkrZal
59
- /92pi3rylPBe+N7LCVIPLUThcP96Pd/e7Pb2Up72V8MDNCCjJ2GD9gRlwG1g
60
- 9DQTtK4TNaDkk3IgVsk5GLknPtrZXRsY0exDtH+UnOJSY+gzUs7EXtmdTk5h
61
- EI0URhWnuGX9kM0VnY5LmEntW79c/9SKwsnfdxXDWGodeCbzO2E+Uy506hav
62
- Uj1IFnopmDjEXx/aAbPVGGLsMvUh5lRb1eZvh+0rzGXb/6Ue1i8UuRaiOAEA
63
- AA==
64
- http_version:
65
- recorded_at: Fri, 05 Oct 2018 20:17:17 GMT
66
- recorded_with: VCR 4.0.0
75
+ H4sIAAAAAAAAA3VPX0vDMBD/LvdcISsirm8qDBwoAx0byghpeq0Z6aVcLnN17LubbeqbTwf3+38A10AFNpCm26e5KvflW1Tz++XqGQoIg7hAEaoD9K05HWPF7RAq4YQFMEpi0kgcvNcRRRx18YIeCxhMjJ+Bm0Xwzo45BvcWvUeS7B2FjWA36h1yzClQlQXUnAR1G9iiHjgIWjlDP4a/mmxlknyobEOmz3XgFaM8BKKL4IpTPUp+ZYKLugm9caTtHw5Va3zMA5BM7bHR1rvcKjd/h9LSKqXu5svM1pOt6nCymE63d0tSs+v1S3qEzWm38f2Z/V/u5vgN+ngBeVoBAAA=
76
+ recorded_at: Tue, 20 Jul 2021 02:14:52 GMT
77
+ recorded_with: VCR 6.0.0
@@ -12,54 +12,66 @@ http_interactions:
12
12
  Accept-Encoding:
13
13
  - gzip, deflate
14
14
  User-Agent:
15
- - Ruby/2.3.1
15
+ - rest-client/2.0.2 (darwin20.2.0 x86_64) ruby/2.7.2p137
16
16
  Content-Type:
17
17
  - application/json
18
18
  Auth0-Client:
19
- - eyJuYW1lIjoicnVieS1hdXRoMCIsInZlcnNpb24iOiI0LjUuMCJ9
19
+ - eyJuYW1lIjoicnVieS1hdXRoMCIsInZlcnNpb24iOiI1LjEuMiIsImVudiI6eyJydWJ5IjoiMi43LjIifX0=
20
20
  Authorization:
21
21
  - Bearer API_TOKEN
22
22
  Content-Length:
23
23
  - '53'
24
- Host:
25
- - auth0-sdk-tests.auth0.com
26
24
  response:
27
25
  status:
28
26
  code: 201
29
27
  message: Created
30
28
  headers:
31
29
  Date:
32
- - Fri, 05 Oct 2018 20:16:25 GMT
30
+ - Tue, 20 Jul 2021 02:06:03 GMT
33
31
  Content-Type:
34
32
  - application/json; charset=utf-8
35
33
  Transfer-Encoding:
36
34
  - chunked
37
35
  Connection:
38
36
  - keep-alive
39
- X-Ratelimit-Limit:
40
- - '10'
41
- X-Ratelimit-Remaining:
42
- - '9'
43
- X-Ratelimit-Reset:
44
- - '1538770587'
45
- Vary:
46
- - origin,accept-encoding
37
+ Cf-Ray:
38
+ - 6718a0c42c0a323a-LAX
47
39
  Cache-Control:
48
- - private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
40
+ - no-cache
49
41
  Content-Encoding:
50
42
  - gzip
51
43
  Strict-Transport-Security:
52
- - max-age=15724800
53
- X-Robots-Tag:
54
- - noindex, nofollow, nosnippet, noarchive
44
+ - max-age=31536000
45
+ Vary:
46
+ - origin,accept-encoding
47
+ Cf-Cache-Status:
48
+ - DYNAMIC
49
+ Expect-Ct:
50
+ - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
51
+ Ot-Baggage-Auth0-Request-Id:
52
+ - 6718a0c42c0a323a
53
+ Ot-Tracer-Sampled:
54
+ - 'true'
55
+ Ot-Tracer-Spanid:
56
+ - 672b1d28532dec55
57
+ Ot-Tracer-Traceid:
58
+ - 1552b04c1ec626a6
59
+ X-Content-Type-Options:
60
+ - nosniff
61
+ X-Ratelimit-Limit:
62
+ - '50'
63
+ X-Ratelimit-Remaining:
64
+ - '49'
65
+ X-Ratelimit-Reset:
66
+ - '1626746764'
67
+ Server:
68
+ - cloudflare
69
+ Alt-Svc:
70
+ - h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443";
71
+ ma=86400
55
72
  body:
56
73
  encoding: ASCII-8BIT
57
74
  string: !binary |-
58
- H4sIAAAAAAAAA3WPQUvEQAyF/0vOFRYRlB4V9iQii+hhWYbpNK0DM0lJMl3K
59
- 0v/u1EU9eUp4L3zv5QKxhxYCk3v+uJ8fH3Z7fc+H/d3wAg3wZJFJob1AHvw2
60
- fLA4I7QmBRsQtCLkkIRTcopmkUa9umsDk1c9s/SvnGJYaszI3FdsJ8XQDSwB
61
- 3SRsGLaYH6iaeMNxcTOKfuu3659aKb7Y565iyOfaBN5Q7YmJrpQbKd1iVaoH
62
- UV3P2Udy4deHdvBJawyS7xL2LqSIZLX08bQ95FPe9n+pp/ULPGRgtDMBAAA=
63
- http_version:
64
- recorded_at: Fri, 05 Oct 2018 20:16:25 GMT
65
- recorded_with: VCR 4.0.0
75
+ H4sIAAAAAAAAA3WPQUvEQAyF/0vOFUpPMke9LSgelAVlGaYzaR2YJiVJd7cs+9+duurNU0Je8r2XC+QEDiKTp/unXdudu3dtdw9v+2dogGfLTAruAtMQthKi5SOCM1mwAUFbhDyScCle0SzTqDf12sAcVE8s6YVLjmu1GZlTxapJMBxXf0TRagCua6CXxdAPLBH9LGwY7Vv6Yf3eVEpY7LOtGApTTQKvqPbIRLeDO1n61eqoLmT1iaeQycc/HdwQitbsSKEvmHwsGclq6I/D9lAo09b/Sz1cvwBFiD9BMwEAAA==
76
+ recorded_at: Tue, 20 Jul 2021 02:06:02 GMT
77
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,70 @@
1
+ require 'spec_helper'
2
+ describe Auth0::Api::V2::Branding do
3
+ before :all do
4
+ dummy_instance = DummyClass.new
5
+ dummy_instance.extend(Auth0::Api::V2::Branding)
6
+ dummy_instance.extend(Auth0::Mixins::Initializer)
7
+ @instance = dummy_instance
8
+ end
9
+
10
+ context '.branding' do
11
+ it { expect(@instance).to respond_to(:branding) }
12
+
13
+ it 'is expected to call get /api/v2/branding' do
14
+ expect(@instance).to receive(:get).with('/api/v2/branding')
15
+ expect { @instance.branding }.not_to raise_error
16
+ end
17
+
18
+ it 'is expected to respond to a get_branding method' do
19
+ expect(@instance).to respond_to(:get_branding)
20
+ end
21
+ end
22
+
23
+ context '.patch_branding' do
24
+ it { expect(@instance).to respond_to(:patch_branding) }
25
+ it 'is expected to call post /api/v2/branding' do
26
+ expect(@instance).to receive(:patch).with(
27
+ '/api/v2/branding',
28
+ template: 'Test'
29
+ )
30
+ expect { @instance.patch_branding({ template: 'Test' }) }.not_to raise_error
31
+ end
32
+
33
+ it 'is expected to respond to a get_branding method' do
34
+ expect(@instance).to respond_to(:update_branding)
35
+ end
36
+ end
37
+
38
+ context '.branding_templates_for_universal_login' do
39
+ it { expect(@instance).to respond_to(:branding) }
40
+
41
+ it 'is expected to call get /api/v2/branding/templates/universal-login' do
42
+ expect(@instance).to receive(:get).with('/api/v2/branding/templates/universal-login')
43
+ expect { @instance.branding_templates_for_universal_login }.not_to raise_error
44
+ end
45
+
46
+ it 'is expected to respond to a get_branding_templates_for_universal_login method' do
47
+ expect(@instance).to respond_to(:get_branding_templates_for_universal_login)
48
+ end
49
+ end
50
+
51
+ context '.put_branding_templates_for_universal_login' do
52
+ it { expect(@instance).to respond_to(:put_branding_templates_for_universal_login) }
53
+ it 'is expected to call put /api/v2/branding/templates/universal-login' do
54
+ expect(@instance).to receive(:put).with(
55
+ '/api/v2/branding/templates/universal-login', template: 'Template'
56
+ )
57
+ expect do
58
+ @instance.put_branding_templates_for_universal_login(template: 'Template')
59
+ end.not_to raise_error
60
+ end
61
+ end
62
+
63
+ context '.delete_branding_templates_for_universal_login' do
64
+ it { expect(@instance).to respond_to(:delete_branding_templates_for_universal_login) }
65
+ it 'is expected to call delete /api/v2/branding/templates/universal-login' do
66
+ expect(@instance).to receive(:delete).with('/api/v2/branding/templates/universal-login')
67
+ expect { @instance.delete_branding_templates_for_universal_login() }.not_to raise_error
68
+ end
69
+ end
70
+ end
@@ -14,6 +14,7 @@ describe Auth0::Api::V2::Connections do
14
14
  expect(@instance).to receive(:get).with(
15
15
  '/api/v2/connections',
16
16
  strategy: nil,
17
+ name: nil,
17
18
  fields: nil,
18
19
  include_fields: nil,
19
20
  page: nil,
@@ -28,6 +29,7 @@ describe Auth0::Api::V2::Connections do
28
29
  include_fields: true,
29
30
  fields: 'name',
30
31
  strategy: nil,
32
+ name: nil,
31
33
  page: nil,
32
34
  per_page: nil
33
35
  )
@@ -42,6 +44,7 @@ describe Auth0::Api::V2::Connections do
42
44
  include_fields: true,
43
45
  fields: 'name,strategy',
44
46
  strategy: nil,
47
+ name: nil,
45
48
  page: nil,
46
49
  per_page: nil
47
50
  )
@@ -56,6 +59,7 @@ describe Auth0::Api::V2::Connections do
56
59
  page: 1,
57
60
  per_page: 10,
58
61
  strategy: nil,
62
+ name: nil,
59
63
  fields: nil,
60
64
  include_fields: nil
61
65
  )
@@ -109,7 +113,7 @@ describe Auth0::Api::V2::Connections do
109
113
  context '.delete_connection_user' do
110
114
  it { expect(@instance).to respond_to(:delete_connection_user) }
111
115
  it 'is expected to call delete to /api/v2/connections/connectionId/users' do
112
- expect(@instance).to receive(:delete).with('/api/v2/connections/connectionId/users?email=email@test.com')
116
+ expect(@instance).to receive(:delete).with('/api/v2/connections/connectionId/users', email: 'email@test.com')
113
117
  @instance.delete_connection_user('connectionId', 'email@test.com')
114
118
  end
115
119