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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: caccb989844cfe680efb2a990f90797e011c17ccf9f591d97c289bc5b87a8697
4
- data.tar.gz: d02be4dd057488124b08ba1a305a5fde3faf3c2f8f7bdfc559a1a808a469027c
3
+ metadata.gz: aee47792913b272d66e3adb2d504793a7ae40b756c9f5ee545bf407df78ff4c4
4
+ data.tar.gz: 33e3cc29078c68806f2cbf463945c11153c2e92d75bc8def9898a14c15623118
5
5
  SHA512:
6
- metadata.gz: 392f9a8393e068074934f53a9414f7379f25ad88d9f029304dd44ee4e6d9873982a44f435875bf6fc5b7ebee5efabfa990d4ba86465170d20305cd83694af3f5
7
- data.tar.gz: 92745e3a044a4e161753762de7b6c1eae1ceab2c2a939739ae1b4839b5cb8a89fd23e37fcdd5ced060c280f7e0e761928e5a440d77498231e406971629084c7d
6
+ metadata.gz: ba6b7b8ad5f8715ad599cf4228a52970d4dd32834b5f35b35fc534ffc066e0b12e431e3ff16d9f30dbe4c5c88f49651e71d891f921bd8fd534a3276a1bf2a5dc
7
+ data.tar.gz: 388f1a1bb1235012b25c336052b51e4a142c2d225af938cb7aa12e01580003ae7430e7a4e2c4b55f81508edc0547a4d6e7df05b2d9c31e636b5a49736cd48233
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- workos (5.5.0)
4
+ workos (5.6.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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
@@ -10,7 +10,7 @@ module WorkOS
10
10
  Google = 'GoogleOAuth'
11
11
  Microsoft = 'MicrosoftOAuth'
12
12
 
13
- ALL = [GitHub, Google, Microsoft].freeze
13
+ ALL = [Apple, GitHub, Google, Microsoft].freeze
14
14
  end
15
15
  end
16
16
  end
@@ -19,7 +19,7 @@ module WorkOS
19
19
  Microsoft = 'MicrosoftOAuth'
20
20
  AuthKit = 'authkit'
21
21
 
22
- ALL = [GitHub, Google, Microsoft, AuthKit].freeze
22
+ ALL = [Apple, GitHub, Google, Microsoft, AuthKit].freeze
23
23
  end
24
24
 
25
25
  # The AuthFactorType is a declaration of a
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WorkOS
4
- VERSION = '5.5.0'
4
+ VERSION = '5.6.0'
5
5
  end
@@ -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
@@ -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 ["GitHubOAuth", "GoogleOAuth", "MicrosoftOAuth"]',
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.5.0
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-08 00:00:00.000000000 Z
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