Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show the user friendly error page on authn failure #332

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

MKodde
Copy link
Member

@MKodde MKodde commented Sep 18, 2024

Comment on lines +52 to +56
Surfnet\SamlBundle\Security\Authentication\Handler\FailureHandler:
class: Surfnet\StepupRa\RaBundle\Security\Authentication\Handler\FailureHandler
public: false
arguments:
$exceptionController: '@Surfnet\StepupRa\RaBundle\Controller\ExceptionController'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm overriding the default FailureHandler here, allowing custom authentication failure handling.

In our case, we show our own stepup user facing error page. Showing a table with error parameters that can be sent to the support team. Helping them enormously in debugging/audit trailing the failure.

);
$this->logger->notice($message);
// The exception controller is used to show the failed authentication
return $this->exceptionController->show($request, $exception);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be strange to inject a controller, and render a response here. But this does exactly what we want this error handler to do. 🤷‍♂️

@MKodde MKodde requested a review from johanib September 19, 2024 07:42
@MKodde MKodde force-pushed the bugfix/show-correct-authz-error-page branch from 66d2a36 to 7498ed4 Compare September 23, 2024 09:47
@MKodde MKodde merged commit 319e682 into main Sep 23, 2024
2 checks passed
@MKodde MKodde deleted the bugfix/show-correct-authz-error-page branch September 23, 2024 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants