mirror of
https://github.com/netzbegruenung/user_saml.git
synced 2024-05-05 18:43:40 +02:00
Merge pull request #271 from nextcloud/better-error-messages
improve error messages in case SAML is not configured properly
This commit is contained in:
commit
0aeaa0401a
|
@ -154,7 +154,7 @@ class SAMLController extends Controller {
|
|||
}
|
||||
}
|
||||
|
||||
throw new NoUserFoundException('Remote user environment variable (' . $uidMapping . ') not found in environment');
|
||||
throw new NoUserFoundException('IDP parameter for the UID (' . $uidMapping . ') not found. Possible parameters are: ' . json_encode(array_keys($auth)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -271,7 +271,7 @@ class SAMLController extends Controller {
|
|||
try {
|
||||
$this->autoprovisionIfPossible($auth->getAttributes());
|
||||
} catch (NoUserFoundException $e) {
|
||||
$this->logger->info('User not found', ['app' => $this->appName]);
|
||||
$this->logger->error($e->getMessage(), ['app' => $this->appName]);
|
||||
return new Http\RedirectResponse($this->urlGenerator->linkToRouteAbsolute('user_saml.SAML.notProvisioned'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue