Skip to content

Commit c568af5

Browse files
authored
Make name of the identifier attribute set in config visible in the error message (#272)
1 parent 5039390 commit c568af5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Services/AuthenticationService.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,12 @@ public function getAuthenticateUser(
105105
if (!array_key_exists($this->userIdAttr, $claims) || !is_array($claims[$this->userIdAttr])) {
106106
$attr = implode(', ', array_keys($claims));
107107
throw new Error\Exception(
108-
'Attribute `useridattr` doesn\'t exists in claims. Available attributes are: ' . $attr,
108+
sprintf(
109+
'User identifier attribute `%s` does not exist in the user attribute state.' .
110+
' Available attributes are: %s.',
111+
$this->userIdAttr,
112+
$attr,
113+
),
109114
);
110115
}
111116

0 commit comments

Comments
 (0)