-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
FormAuthenticator does not dispatch to an error page but redirect #10295
Comments
There are multiple versions of If you need the dispatching behaviour we will need to look into implementing some extension of this class that will live in the But regardless, the constructor argument should be removed because it is not possible to do a servlet dispatch from this class. |
It makes sense, thanks for the clarification @lachlan-roberts. Will the ee10 version of FormAuthenticator be made available in upcoming releases, 12.0.x maybe? |
@rakeshk15 yes this will be in a future 12.0.x release, which shouldn't be too long. |
Signed-off-by: Lachlan Roberts <[email protected]>
…patch Signed-off-by: Lachlan Roberts <[email protected]>
@rakeshk15 I have opened a PR for this (#10313), but it has been marked as low priority for the moment. Could you describe your use-case and why you require this feature. |
@lachlan-roberts I have a login page where on putting the wrong username/password I show an error message, since in Jetty 11 the request was dispatched to the error page in case of login error(basically the form login page and error pages are same) and the error message was shown but now with Jetty 12 there is a redirect to form error page thats why the error attribute set from the backend is lost and user never gets to know what actually had happened. Basically this is my setup for FormAuthenticator There is a servlet mounted at This way the error message is displayed to the user but if there is a redirect then the attribute i set is lost and no error message is displayed. This is the reason I was looking for this feature. |
…patch Issue #10295 - implement EE10 FormAuthenticator with dispatch option
@rakeshk15 PR #10313 has been merged, the jetty-core form authenticator will now dispatch to a target in EE10 without a redirect. It is marked for the |
thanks you @lachlan-roberts |
Jetty version(s)
Jetty 12.0.0
Java version/vendor
Java 17
OS type/version
macOS Ventura 13.5
Description
Jetty 12 FormAuthenticator constructor takes the dispatch argument and I have passed true there but when there is a login error then the redirect happens and not dispatch.
Jetty 11 dispatches the request if the dispatch is true.
This is inconsistent behaviour.
The text was updated successfully, but these errors were encountered: