Skip to content

Commit 4e5d237

Browse files
authored
Add customAttributes field to SSO Profile. (#276)
1 parent dbdd38f commit 4e5d237

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

lib/Resource/Profile.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class Profile extends BaseWorkOSResource
3434
"idpId",
3535
"role",
3636
"groups",
37+
"customAttributes",
3738
"rawAttributes"
3839
];
3940

@@ -48,6 +49,7 @@ class Profile extends BaseWorkOSResource
4849
"idp_id" => "idpId",
4950
"role" => "role",
5051
"groups" => "groups",
52+
"custom_attributes" => "customAttributes",
5153
"raw_attributes" => "rawAttributes"
5254
];
5355

tests/WorkOS/SSOTest.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,14 @@ private function profileAndTokenResponseFixture()
221221
"idp_id" => "randomalphanum",
222222
"role" => new RoleResponse("admin"),
223223
"groups" => array("Admins", "Developers"),
224+
"custom_attributes" => array("license" => "professional"),
224225
"raw_attributes" => array(
225226
"email" => "[email protected]",
226227
"first_name" => "hen",
227228
"last_name" => "cha",
228229
"ipd_id" => "randomalphanum",
229-
"groups" => array("Admins", "Developers")
230+
"groups" => array("Admins", "Developers"),
231+
"license" => "professional"
230232
)
231233
]
232234
]);
@@ -245,13 +247,15 @@ private function profileFixture()
245247
"idpId" => "randomalphanum",
246248
"role" => new RoleResponse("admin"),
247249
"groups" => array("Admins", "Developers"),
250+
"customAttributes" => array("license" => "professional"),
248251
"rawAttributes" => array(
249252
"email" => "[email protected]",
250253
"first_name" => "hen",
251254
"last_name" => "cha",
252255
"ipd_id" => "randomalphanum",
253-
"groups" => array("Admins", "Developers")
254-
)
256+
"groups" => array("Admins", "Developers"),
257+
"license" => "professional"
258+
),
255259
];
256260
}
257261

0 commit comments

Comments
 (0)