workos 5.5.0 → 5.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/workos/types/intent.rb +2 -1
- data/lib/workos/types/provider.rb +1 -1
- data/lib/workos/user_management.rb +1 -1
- data/lib/workos/version.rb +1 -1
- data/spec/lib/workos/portal_spec.rb +15 -0
- data/spec/lib/workos/sso_spec.rb +2 -1
- data/spec/lib/workos/user_management_spec.rb +1 -1
- data/spec/support/fixtures/vcr_cassettes/portal/generate_link_certificate_renewal.yml +72 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aee47792913b272d66e3adb2d504793a7ae40b756c9f5ee545bf407df78ff4c4
|
4
|
+
data.tar.gz: 33e3cc29078c68806f2cbf463945c11153c2e92d75bc8def9898a14c15623118
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba6b7b8ad5f8715ad599cf4228a52970d4dd32834b5f35b35fc534ffc066e0b12e431e3ff16d9f30dbe4c5c88f49651e71d891f921bd8fd534a3276a1bf2a5dc
|
7
|
+
data.tar.gz: 388f1a1bb1235012b25c336052b51e4a142c2d225af938cb7aa12e01580003ae7430e7a4e2c4b55f81508edc0547a4d6e7df05b2d9c31e636b5a49736cd48233
|
data/Gemfile.lock
CHANGED
data/lib/workos/types/intent.rb
CHANGED
@@ -6,11 +6,12 @@ module WorkOS
|
|
6
6
|
# intents while generating an Admin Portal link.
|
7
7
|
module Intent
|
8
8
|
AUDIT_LOGS = 'audit_logs'
|
9
|
+
CERTIFICATE_RENEWAL = 'certificate_renewal'
|
9
10
|
DSYNC = 'dsync'
|
10
11
|
LOG_STREAMS = 'log_streams'
|
11
12
|
SSO = 'sso'
|
12
13
|
|
13
|
-
ALL = [AUDIT_LOGS, DSYNC, LOG_STREAMS, SSO].freeze
|
14
|
+
ALL = [AUDIT_LOGS, CERTIFICATE_RENEWAL, DSYNC, LOG_STREAMS, SSO].freeze
|
14
15
|
end
|
15
16
|
end
|
16
17
|
end
|
data/lib/workos/version.rb
CHANGED
@@ -51,6 +51,21 @@ describe WorkOS::Portal do
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
end
|
54
|
+
|
55
|
+
describe 'with the certificate_renewal intent' do
|
56
|
+
it 'returns an Admin Portal link' do
|
57
|
+
VCR.use_cassette 'portal/generate_link_certificate_renewal', match_requests_on: %i[path body] do
|
58
|
+
portal_link = described_class.generate_link(
|
59
|
+
intent: 'certificate_renewal',
|
60
|
+
organization: organization,
|
61
|
+
)
|
62
|
+
|
63
|
+
expect(portal_link).to eq(
|
64
|
+
'https://id.workos.com/portal/launch?secret=secret',
|
65
|
+
)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
54
69
|
end
|
55
70
|
|
56
71
|
describe 'with an invalid organization' do
|
data/spec/lib/workos/sso_spec.rb
CHANGED
@@ -281,7 +281,8 @@ describe WorkOS::SSO do
|
|
281
281
|
described_class.authorization_url(**args)
|
282
282
|
end.to raise_error(
|
283
283
|
ArgumentError,
|
284
|
-
'Okta is not a valid value. `provider` must be in
|
284
|
+
'Okta is not a valid value. `provider` must be in ' \
|
285
|
+
'["AppleOAuth", "GitHubOAuth", "GoogleOAuth", "MicrosoftOAuth"]',
|
285
286
|
)
|
286
287
|
end
|
287
288
|
end
|
@@ -213,7 +213,7 @@ describe WorkOS::UserManagement do
|
|
213
213
|
end.to raise_error(
|
214
214
|
ArgumentError,
|
215
215
|
'Okta is not a valid value. `provider` must be in ' \
|
216
|
-
'["GitHubOAuth", "GoogleOAuth", "MicrosoftOAuth", "authkit"]',
|
216
|
+
'["AppleOAuth", "GitHubOAuth", "GoogleOAuth", "MicrosoftOAuth", "authkit"]',
|
217
217
|
)
|
218
218
|
end
|
219
219
|
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.workos.com/portal/generate_link
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"intent":"certificate_renewal","organization":"org_01EHQMYV6MBK39QC5PZXHY59C3","return_url":null,"success_url":null}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
User-Agent:
|
17
|
+
- WorkOS; ruby/2.7.1; x86_64-darwin19; v0.5.0
|
18
|
+
Authorization:
|
19
|
+
- Bearer <API_KEY>
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- Cowboy
|
27
|
+
Connection:
|
28
|
+
- keep-alive
|
29
|
+
Vary:
|
30
|
+
- Origin, Accept-Encoding
|
31
|
+
Access-Control-Allow-Credentials:
|
32
|
+
- 'true'
|
33
|
+
Content-Security-Policy:
|
34
|
+
- 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
|
35
|
+
https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
|
36
|
+
''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
|
37
|
+
X-Dns-Prefetch-Control:
|
38
|
+
- 'off'
|
39
|
+
Expect-Ct:
|
40
|
+
- max-age=0
|
41
|
+
X-Frame-Options:
|
42
|
+
- SAMEORIGIN
|
43
|
+
Strict-Transport-Security:
|
44
|
+
- max-age=15552000; includeSubDomains
|
45
|
+
X-Download-Options:
|
46
|
+
- noopen
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Permitted-Cross-Domain-Policies:
|
50
|
+
- none
|
51
|
+
Referrer-Policy:
|
52
|
+
- no-referrer
|
53
|
+
X-Xss-Protection:
|
54
|
+
- '0'
|
55
|
+
X-Request-Id:
|
56
|
+
- cb9ad5cf-243a-4084-a4f6-2d7d2b097b8b
|
57
|
+
Content-Type:
|
58
|
+
- application/json; charset=utf-8
|
59
|
+
Content-Length:
|
60
|
+
- '79'
|
61
|
+
Etag:
|
62
|
+
- W/"4f-NN86NUZRu/GQgPAYTexTS6/9DnM"
|
63
|
+
Date:
|
64
|
+
- Wed, 09 Sep 2020 23:43:07 GMT
|
65
|
+
Via:
|
66
|
+
- 1.1 vegur
|
67
|
+
body:
|
68
|
+
encoding: UTF-8
|
69
|
+
string: '{"link":"https://id.workos.com/portal/launch?secret=secret"}'
|
70
|
+
http_version:
|
71
|
+
recorded_at: Wed, 09 Sep 2020 23:43:07 GMT
|
72
|
+
recorded_with: VCR 5.0.0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- WorkOS
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -241,6 +241,7 @@ files:
|
|
241
241
|
- spec/support/fixtures/vcr_cassettes/passwordless/send_session.yml
|
242
242
|
- spec/support/fixtures/vcr_cassettes/passwordless/send_session_invalid.yml
|
243
243
|
- spec/support/fixtures/vcr_cassettes/portal/generate_link_audit_logs.yml
|
244
|
+
- spec/support/fixtures/vcr_cassettes/portal/generate_link_certificate_renewal.yml
|
244
245
|
- spec/support/fixtures/vcr_cassettes/portal/generate_link_dsync.yml
|
245
246
|
- spec/support/fixtures/vcr_cassettes/portal/generate_link_invalid.yml
|
246
247
|
- spec/support/fixtures/vcr_cassettes/portal/generate_link_sso.yml
|
@@ -452,6 +453,7 @@ test_files:
|
|
452
453
|
- spec/support/fixtures/vcr_cassettes/passwordless/send_session.yml
|
453
454
|
- spec/support/fixtures/vcr_cassettes/passwordless/send_session_invalid.yml
|
454
455
|
- spec/support/fixtures/vcr_cassettes/portal/generate_link_audit_logs.yml
|
456
|
+
- spec/support/fixtures/vcr_cassettes/portal/generate_link_certificate_renewal.yml
|
455
457
|
- spec/support/fixtures/vcr_cassettes/portal/generate_link_dsync.yml
|
456
458
|
- spec/support/fixtures/vcr_cassettes/portal/generate_link_invalid.yml
|
457
459
|
- spec/support/fixtures/vcr_cassettes/portal/generate_link_sso.yml
|