0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-04-18 10:28:43 +00:00

Added reason, if existing, into SAML acs error

Closes 
This commit is contained in:
Dan Brown 2022-09-20 12:52:44 +01:00
parent 050d69ea27
commit dce6a82954
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9

View file

@ -109,9 +109,10 @@ class Saml2Service
$errors = $toolkit->getErrors();
if (!empty($errors)) {
throw new Error(
'Invalid ACS Response: ' . implode(', ', $errors)
);
$reason = $toolkit->getLastErrorReason();
$message = 'Invalid ACS Response; Errors: ' . implode(', ', $errors);
$message .= $reason ? "; Reason: {$reason}" : '';
throw new Error($message);
}
if (!$toolkit->isAuthenticated()) {