Custom error messaging in SSP 2.5.0

14 views
Skip to first unread message

Thomas de Jesus

unread,
Jun 8, 2026, 12:16:21 PMJun 8
to SimpleSAMLphp
I have two situations. The first is disabled users in my LDAP. I need a more informative message than at worst the stack trace and at best, just that an error has occurred.

The second involves DUO MFA. During enrollment into DUO the user often loses the session and an error message like this happens:

- Backtrace:
2 src/SimpleSAML/Error/ExceptionHandler.php:44 (SimpleSAML\Error\ExceptionHandler::customExceptionHandler)
1 vendor/symfony/error-handler/ErrorHandler.php:538 (Symfony\Component\ErrorHandler\ErrorHandler::handleException)
0 [builtin] (N/A)
Caused by: SimpleSAML\Error\Exception: No state with Duo nonce.
Backtrace:
2 modules/duouniversal/public/duocallback.php:59 (require)
1 src/SimpleSAML/Module.php:308 (SimpleSAML\Module::process)
0 public/module.php:17 (N/A)

I just need a simple message telling them they just need to log in again as the session timed out or that they forgot to pay the you took too long tax. 

Tim van Dijen

unread,
Jun 11, 2026, 9:36:15 AMJun 11
to SimpleSAMLphp
Hi Jesus,

I think this is a matter of catching the LDAP-exceptions and handle them more gracefully. This shouldn't be hard to fix in the ldap-module.
The same goes for the DUO-module.

Besides that, SimpleSAMLphp has the option to use your own pretty printed exception:
https://github.com/simplesamlphp/simplesamlphp/blob/master/config/config.php.dist#L353-L359

- Tim

Op maandag 8 juni 2026 om 18:16:21 UTC+2 schreef trf...@gmail.com:
Reply all
Reply to author
Forward
0 new messages