Skip to content

Commit c4f26e7

Browse files
committed
use display_name from id broker instead of concatenation
1 parent 8562f3d commit c4f26e7

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

features/bootstrap/LoginContext.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ public function iShouldHaveTheCorrectAttributes()
291291
Assert::keyExists($userInfo, "sn");
292292
Assert::keyExists($userInfo, "givenName");
293293
Assert::keyExists($userInfo, "displayName");
294-
Assert::Equals($userInfo["displayName"][0], trim($userInfo["sn"][0] + " " + $userInfo["givenName"][0]));
295294
Assert::keyExists($userInfo, "mail");
296295
Assert::keyExists($userInfo, "employeeNumber");
297296
Assert::keyExists($userInfo, "cn");

modules/silauth/src/Auth/Source/auth/IdBroker.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ public function getAuthenticatedUser(string $username, string $password): ?array
9494
$userInfo['method'],
9595
$userInfo['manager_email'] ?? null,
9696
$userInfo['profile_review'] ?? 'no',
97-
$userInfo['member'] ?? []
97+
$userInfo['member'] ?? [],
98+
$userInfo['display_name'],
9899
);
99100
}
100101
}

modules/silauth/src/Auth/Source/saml/User.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ public static function convertToSamlFieldNames(
1717
array $method,
1818
?string $managerEmail,
1919
string $profileReview,
20-
array $member
20+
array $member,
21+
string $displayName
2122
): array {
2223

2324
// eduPersonUniqueId (only alphanumeric allowed)
@@ -47,7 +48,7 @@ public static function convertToSamlFieldNames(
4748

4849
'sn' => (array)$lastName,
4950
'givenName' => (array)$firstName,
50-
'displayName' => (array)trim($firstName . " " . $lastName),
51+
'displayName' => (array)$displayName,
5152
'mail' => (array)$email,
5253
'employeeNumber' => (array)$employeeId,
5354
'cn' => (array)$username,

0 commit comments

Comments
 (0)