workos 2.11.0 → 2.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e96d311d7254c5da86d5e32aabdc854da6b019c3c7cb68067ca33966548ffea9
4
- data.tar.gz: db7e65bd0e13f8b7d41efd82b97e45c3049bf2850c34d5be82f1c37de2d88aa2
3
+ metadata.gz: c7b064e3e59a510f6551067759507aa38d693ffd92e67d8522ef72b3ab7ab575
4
+ data.tar.gz: e234ca4210e9953c36bf8dbc705ae72db4a8c906f67df12d4967ba5edf4ce725
5
5
  SHA512:
6
- metadata.gz: d9964de78c4d25700f4d073bf3f09d6d8896bbf55096bc9a49f83a64ff6cad3fe20fe8e4ba6fc364994e7d7b9921ad8e816c1dad07a9fdb49affded326dcd14f
7
- data.tar.gz: 35410819d6fa7f182d0acc86f18025c5c9d934af564d899b8e5b1af9b0ef461ae6fa6c21e2fb740c1938645339ca01b78a39f973c6c754a81c308469c649d8bf
6
+ metadata.gz: f846d2273a005f8defc70445b0383cfe8d06dc605b0c77b92be6716bc5ddf43756ff51c1849d251c056d07f548c15e3e1baf4db63e08c341e8e59681c603a383
7
+ data.tar.gz: 50629d557c2a46fb91dc32e12a662c6388d55736576c30a5e0db32ae071d084196628cce7b2bf97414eb314b024b8d35a5113734502350ab45a3ed401e44c6bb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- workos (2.11.0)
4
+ workos (2.12.0)
5
5
  sorbet-runtime (~> 0.5)
6
6
 
7
7
  GEM
@@ -12,7 +12,7 @@ module WorkOS
12
12
  extend T::Sig
13
13
 
14
14
  sig { returns(String) }
15
- attr_accessor :id, :email, :first_name, :last_name, :organization_id,
15
+ attr_accessor :id, :email, :first_name, :last_name, :groups, :organization_id,
16
16
  :connection_id, :connection_type, :idp_id, :raw_attributes
17
17
 
18
18
  # rubocop:disable Metrics/AbcSize
@@ -24,6 +24,7 @@ module WorkOS
24
24
  @email = T.let(raw.email, String)
25
25
  @first_name = raw.first_name
26
26
  @last_name = raw.last_name
27
+ @groups = raw.groups
27
28
  @organization_id = raw.organization_id
28
29
  @connection_id = T.let(raw.connection_id, String)
29
30
  @connection_type = T.let(raw.connection_type, String)
@@ -43,6 +44,7 @@ module WorkOS
43
44
  email: email,
44
45
  first_name: first_name,
45
46
  last_name: last_name,
47
+ groups: groups,
46
48
  organization_id: organization_id,
47
49
  connection_id: connection_id,
48
50
  connection_type: connection_type,
@@ -62,6 +64,7 @@ module WorkOS
62
64
  email: hash[:email],
63
65
  first_name: hash[:first_name],
64
66
  last_name: hash[:last_name],
67
+ groups: hash[:groups],
65
68
  organization_id: hash[:organization_id],
66
69
  connection_id: hash[:connection_id],
67
70
  connection_type: hash[:connection_type],
@@ -10,6 +10,7 @@ module WorkOS
10
10
  const :email, String
11
11
  const :first_name, T.nilable(String)
12
12
  const :last_name, T.nilable(String)
13
+ const :groups, T.nilable(T::Array[String])
13
14
  const :organization_id, T.nilable(String)
14
15
  const :connection_id, String
15
16
  const :connection_type, String
@@ -2,5 +2,5 @@
2
2
  # typed: strong
3
3
 
4
4
  module WorkOS
5
- VERSION = '2.11.0'
5
+ VERSION = '2.12.0'
6
6
  end
@@ -289,6 +289,7 @@ describe WorkOS::SSO do
289
289
  end
290
290
 
291
291
  describe '.get_profile' do
292
+ # rubocop:disable Metrics/BlockLength
292
293
  it 'returns a profile' do
293
294
  VCR.use_cassette 'sso/profile' do
294
295
  profile = described_class.get_profile(access_token: 'access_token')
@@ -301,6 +302,7 @@ describe WorkOS::SSO do
301
302
  id: 'prof_01EEJTY9SZ1R350RB7B73SNBKF',
302
303
  idp_id: '116485463307139932699',
303
304
  last_name: 'Loblaw',
305
+ groups: nil,
304
306
  organization_id: 'org_01FG53X8636WSNW2WEKB2C31ZB',
305
307
  raw_attributes: {
306
308
  email: 'bob.loblaw@workos.com',
@@ -317,6 +319,7 @@ describe WorkOS::SSO do
317
319
  expect(profile.to_json).to eq(expectation)
318
320
  end
319
321
  end
322
+ # rubocop:enable Metrics/BlockLength
320
323
  end
321
324
 
322
325
  describe '.profile_and_token' do
@@ -370,6 +373,7 @@ describe WorkOS::SSO do
370
373
  id: 'prof_01DRA1XNSJDZ19A31F183ECQW5',
371
374
  idp_id: '00u1klkowm8EGah2H357',
372
375
  last_name: 'Demo',
376
+ groups: %w[Admins Developers],
373
377
  organization_id: 'org_01FG53X8636WSNW2WEKB2C31ZB',
374
378
  raw_attributes: {
375
379
  email: 'demo@workos-okta.com',
@@ -377,6 +381,7 @@ describe WorkOS::SSO do
377
381
  id: 'prof_01DRA1XNSJDZ19A31F183ECQW5',
378
382
  idp_id: '00u1klkowm8EGah2H357',
379
383
  last_name: 'Demo',
384
+ groups: %w[Admins Developers],
380
385
  },
381
386
  }
382
387
 
@@ -1 +1 @@
1
- {"profile":{"object":"profile","id":"prof_01DRA1XNSJDZ19A31F183ECQW5","email":"demo@workos-okta.com","first_name":"WorkOS","organization_id":"org_01FG53X8636WSNW2WEKB2C31ZB","connection_id":"conn_01EMH8WAK20T42N2NBMNBCYHAG","connection_type":"OktaSAML","last_name":"Demo","idp_id":"00u1klkowm8EGah2H357","raw_attributes":{"id":"prof_01DRA1XNSJDZ19A31F183ECQW5","email":"demo@workos-okta.com","first_name":"WorkOS","last_name":"Demo","idp_id":"00u1klkowm8EGah2H357"}},"access_token":"01DVX6QBS3EG6FHY2ESAA5Q65X"}
1
+ {"profile":{"object":"profile","id":"prof_01DRA1XNSJDZ19A31F183ECQW5","email":"demo@workos-okta.com","first_name":"WorkOS","organization_id":"org_01FG53X8636WSNW2WEKB2C31ZB","connection_id":"conn_01EMH8WAK20T42N2NBMNBCYHAG","connection_type":"OktaSAML","last_name":"Demo","groups":["Admins","Developers"],"idp_id":"00u1klkowm8EGah2H357","raw_attributes":{"id":"prof_01DRA1XNSJDZ19A31F183ECQW5","email":"demo@workos-okta.com","first_name":"WorkOS","last_name":"Demo","groups":["Admins","Developers"],"idp_id":"00u1klkowm8EGah2H357"}},"access_token":"01DVX6QBS3EG6FHY2ESAA5Q65X"}
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: 2.11.0
4
+ version: 2.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - WorkOS
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-10 00:00:00.000000000 Z
11
+ date: 2023-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sorbet-runtime
@@ -413,7 +413,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
413
413
  - !ruby/object:Gem::Version
414
414
  version: '0'
415
415
  requirements: []
416
- rubygems_version: 3.4.6
416
+ rubygems_version: 3.4.7
417
417
  signing_key:
418
418
  specification_version: 4
419
419
  summary: API client for WorkOS