Skip to content

Commit aba90dc

Browse files
authored
Merge pull request #6 from GoIntegro/go5-auth-idp-module
Role added to saml attributes
2 parents fd95858 + d759b61 commit aba90dc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

modules/go5auth/lib/Auth/Source/LoggedUser.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public function authenticate(&$state)
7070

7171
$userAttributes = [];
7272
$userInfoAttributes = $userInfo->data->attributes;
73+
$userInfoAttributes->role = $tokenInfo->user_role;
7374
$userAttributesMapping = $metadataSP['UserAttributesMapping'];
7475

7576
if (is_array($userAttributesMapping) && !empty($userAttributesMapping)) {
@@ -86,6 +87,8 @@ public function authenticate(&$state)
8687
'document-type' => $userInfoAttributes->{'document-type'},
8788
'name' => $userInfoAttributes->{'name'},
8889
'last-name' => $userInfoAttributes->{'last-name'},
90+
'job-title-name' => $userInfoAttributes->{'job-title-name'},
91+
'role' => $userInfoAttributes->{'role'},
8992
];
9093
}
9194

0 commit comments

Comments
 (0)