workos 5.16.1 → 5.17.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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/workos/profile.rb +5 -1
- data/lib/workos/version.rb +1 -1
- data/spec/lib/workos/sso_spec.rb +5 -0
- data/spec/support/fixtures/vcr_cassettes/sso/profile.yml +1 -1
- data/spec/support/profile.txt +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34dd9115de4ff8dcd248011952ac1ae474b49256ddac3463e5078a97d514cbe5
|
4
|
+
data.tar.gz: fde63e4c17112ebbb0de9c64a5cc5e2b502854fa4de0f09d710fb5da32d70efd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2a72e8d0b4a076339225207708000e3ec62b88f093e0468d3933a4048115a93694dda434c28f7e741608d04a3bfcce4cea7952fbf6b5b836b80eba3ab810cd1
|
7
|
+
data.tar.gz: d411653d71eafd723d65227ec2d1bc447e6de5d04ec56e9626e14f08635f24be428f5c341538a3ae138f6af1dbc69355a4a5aeeb7712d4631fd8bbc116245a35
|
data/Gemfile.lock
CHANGED
data/lib/workos/profile.rb
CHANGED
@@ -10,8 +10,9 @@ module WorkOS
|
|
10
10
|
include HashProvider
|
11
11
|
|
12
12
|
attr_accessor :id, :email, :first_name, :last_name, :role, :groups, :organization_id,
|
13
|
-
:connection_id, :connection_type, :idp_id, :raw_attributes
|
13
|
+
:connection_id, :connection_type, :idp_id, :custom_attributes, :raw_attributes
|
14
14
|
|
15
|
+
# rubocop:disable Metrics/AbcSize
|
15
16
|
def initialize(profile_json)
|
16
17
|
hash = JSON.parse(profile_json, symbolize_names: true)
|
17
18
|
|
@@ -25,8 +26,10 @@ module WorkOS
|
|
25
26
|
@connection_id = hash[:connection_id]
|
26
27
|
@connection_type = hash[:connection_type]
|
27
28
|
@idp_id = hash[:idp_id]
|
29
|
+
@custom_attributes = hash[:custom_attributes]
|
28
30
|
@raw_attributes = hash[:raw_attributes]
|
29
31
|
end
|
32
|
+
# rubocop:enable Metrics/AbcSize
|
30
33
|
|
31
34
|
def full_name
|
32
35
|
[first_name, last_name].compact.join(' ')
|
@@ -44,6 +47,7 @@ module WorkOS
|
|
44
47
|
connection_id: connection_id,
|
45
48
|
connection_type: connection_type,
|
46
49
|
idp_id: idp_id,
|
50
|
+
custom_attributes: custom_attributes,
|
47
51
|
raw_attributes: raw_attributes,
|
48
52
|
}
|
49
53
|
end
|
data/lib/workos/version.rb
CHANGED
data/spec/lib/workos/sso_spec.rb
CHANGED
@@ -307,6 +307,7 @@ describe WorkOS::SSO do
|
|
307
307
|
},
|
308
308
|
groups: nil,
|
309
309
|
organization_id: 'org_01FG53X8636WSNW2WEKB2C31ZB',
|
310
|
+
custom_attributes: {},
|
310
311
|
raw_attributes: {
|
311
312
|
email: 'bob.loblaw@workos.com',
|
312
313
|
family_name: 'Loblaw',
|
@@ -381,6 +382,9 @@ describe WorkOS::SSO do
|
|
381
382
|
},
|
382
383
|
groups: %w[Admins Developers],
|
383
384
|
organization_id: 'org_01FG53X8636WSNW2WEKB2C31ZB',
|
385
|
+
custom_attributes: {
|
386
|
+
license: 'professional',
|
387
|
+
},
|
384
388
|
raw_attributes: {
|
385
389
|
email: 'demo@workos-okta.com',
|
386
390
|
first_name: 'WorkOS',
|
@@ -388,6 +392,7 @@ describe WorkOS::SSO do
|
|
388
392
|
idp_id: '00u1klkowm8EGah2H357',
|
389
393
|
last_name: 'Demo',
|
390
394
|
groups: %w[Admins Developers],
|
395
|
+
license: 'professional',
|
391
396
|
},
|
392
397
|
}
|
393
398
|
|
@@ -67,7 +67,7 @@ http_interactions:
|
|
67
67
|
body:
|
68
68
|
encoding: UTF-8
|
69
69
|
string:
|
70
|
-
'{"object":"profile","id":"prof_01EEJTY9SZ1R350RB7B73SNBKF","organization_id":"org_01FG53X8636WSNW2WEKB2C31ZB","connection_id":"conn_01E83FVYZHY7DM4S9503JHV0R5","connection_type":"GoogleOAuth","idp_id":"116485463307139932699","email":"bob.loblaw@workos.com","first_name":"Bob","last_name":"Loblaw","role":{"slug":"member"},"raw_attributes":{"hd":"workos.com","id":"116485463307139932699","name":"Bob
|
70
|
+
'{"object":"profile","id":"prof_01EEJTY9SZ1R350RB7B73SNBKF","organization_id":"org_01FG53X8636WSNW2WEKB2C31ZB","connection_id":"conn_01E83FVYZHY7DM4S9503JHV0R5","connection_type":"GoogleOAuth","idp_id":"116485463307139932699","email":"bob.loblaw@workos.com","first_name":"Bob","last_name":"Loblaw","role":{"slug":"member"},"custom_attributes":{},"raw_attributes":{"hd":"workos.com","id":"116485463307139932699","name":"Bob
|
71
71
|
Loblaw","email":"bob.loblaw@workos.com","locale":"en","picture":"https://lh3.googleusercontent.com/a-/AOh14GyO2hLlgZvteDQ3Ldi3_-RteZLya0hWH7247Cam=s96-c","given_name":"Bob","family_name":"Loblaw","verified_email":true}}'
|
72
72
|
http_version:
|
73
73
|
recorded_at: Tue, 18 May 2021 22:55:21 GMT
|
data/spec/support/profile.txt
CHANGED
@@ -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","role":{"slug": "admin"},"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"}
|
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","role":{"slug": "admin"},"groups":["Admins","Developers"],"idp_id":"00u1klkowm8EGah2H357","custom_attributes":{"license": "professional"},"raw_attributes":{"id":"prof_01DRA1XNSJDZ19A31F183ECQW5","email":"demo@workos-okta.com","first_name":"WorkOS","last_name":"Demo","groups":["Admins","Developers"],"idp_id":"00u1klkowm8EGah2H357","license": "professional"}},"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: 5.
|
4
|
+
version: 5.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- WorkOS
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-04-
|
11
|
+
date: 2025-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: encryptor
|