Situation : the user is forced to change the password when clicking the "Change password" button. This click calls the form of the overridden onSubmit () (Wicket) method. In this method:
protected void onSubmit() {
In fact, call setResponsePage (...) is a call to Wicket Component.setResponsePage ()
public final <C extends Page> void setResponsePage(final Class<C> cls) { getRequestCycle().setResponsePage(cls); }
My task was to replace the gate with Spring security, and it was solved - I intercepted the call of this method in the Spring Filter Protection Chain (the class below is one of the components of this chaing). And it can do everything from the code snippet above, except for one thing - I donโt know how to redirect to RestorePasswordPage
public class ForgotPasswordForcePasswordChangeEventHandler implements CustomEventHandler { public void handle(HttpServletRequest request, HttpServletResponse response) {
Questions :
- Is it possible to access the Wicket RequestCycle if I received only the HttpServletRequest request as input.
- Any other way to solve this problem?
source share