Commit 0ab32134 authored by Jacob Priddy's avatar Jacob Priddy 👌

Return a 400 on a invalid saml user

parent 4a910771
......@@ -88,7 +88,7 @@ class AuthController extends ApiController
/**
* Handle SAML login
*
* This API is only meant to be used by SAML after a login.
* This API is only meant to be used by SAML after a return from a login.
*
* @param AuthenticateUseCase $authenticateUseCase
* @return mixed
......@@ -102,8 +102,9 @@ class AuthController extends ApiController
try {
$authenticateUseCase->handleSamlLogin($presenter);
} catch (UserCreationException $e) {
$this->setStatusCode(400);
return $this->respondWithError(
'There was an error authenticating the user. Please contact an administrator.'
'Invalid SAML user given. If you believe this is in error, please contact and administrator.'
);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment