workos 5.5.1 → 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: 94d723bd3b90173b4441a1120b73952cd884dca2d5ec252e08c5ba27211bc675
4
- data.tar.gz: d17a6769e5cc60554ad667857a516f2b3be3cc463196805a901cc10f4afa957b
3
+ metadata.gz: aee47792913b272d66e3adb2d504793a7ae40b756c9f5ee545bf407df78ff4c4
4
+ data.tar.gz: 33e3cc29078c68806f2cbf463945c11153c2e92d75bc8def9898a14c15623118
5
5
  SHA512:
6
- metadata.gz: 4ca39225bbfa687f02e01db828262aaf54daa744e381b2aa10a84afa771c49285c2ea119be3dbb96fdb6cae8d6ab814a86a4a10cbf67b8e92036ca057b84e60c
7
- data.tar.gz: 0abcfb9a3dcb4014a9663815bcb228218d654b423a4a9d5f542fcfb162694a809fd418b9a3e6beb279846838587904853af7d3b5580730aec62ba757a5ed1b96
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.1)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WorkOS
4
- VERSION = '5.5.1'
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
@@ -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.1
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-09 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