Release 2.20.0 (#4987)
This commit is contained in:
@@ -98,7 +98,7 @@ class SamlAuthenticator extends AbstractAuthenticator
|
||||
|
||||
if (isset($this->options['username_attribute'])) {
|
||||
if (!\array_key_exists($this->options['username_attribute'], $attributes)) {
|
||||
throw new \Exception(sprintf("Attribute '%s' not found in SAML data", $this->options['username_attribute']));
|
||||
throw new \Exception(\sprintf("Attribute '%s' not found in SAML data", $this->options['username_attribute']));
|
||||
}
|
||||
|
||||
$username = $attributes[$this->options['username_attribute']][0];
|
||||
|
||||
@@ -32,7 +32,7 @@ final class SamlLoginAttributes
|
||||
public function getAttribute(string $name): mixed
|
||||
{
|
||||
if (!\array_key_exists($name, $this->attributes)) {
|
||||
throw new \InvalidArgumentException(sprintf('This SAML login has no "%s" attribute.', $name));
|
||||
throw new \InvalidArgumentException(\sprintf('This SAML login has no "%s" attribute.', $name));
|
||||
}
|
||||
|
||||
return $this->attributes[$name];
|
||||
|
||||
@@ -54,7 +54,7 @@ final class SamlProvider
|
||||
} catch (\Exception $ex) {
|
||||
$this->logger->error($ex->getMessage());
|
||||
throw new AuthenticationException(
|
||||
sprintf('Failed creating or hydrating user "%s": %s', $token->getUserIdentifier(), $ex->getMessage())
|
||||
\sprintf('Failed creating or hydrating user "%s": %s', $token->getUserIdentifier(), $ex->getMessage())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user