Re: Stateless login page with auth-roles
Hi, https://github.com/apache/wicket/blob/master/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authentication/AuthenticatedWebApplication.java#L101 There is no code that binds the session. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Wed, Dec 10, 2014 at 11:22 AM, ChambreNoire a...@tentelemed.com wrote: Hi, I've followed the Wicket guide's chapter on security in order to implement authorization. Amongst other bits it advises using the following code in the AuthenticatedPage : @Override protected void onConfigure() { super.onConfigure(); AuthenticatedWebApplication app = (AuthenticatedWebApplication)Application.get(); //if user is not signed in, redirect him to sign in page if(!AuthenticatedWebSession.get().isSignedIn()) app.restartResponseAtSignInPage(); } The problem is that restartResponseAtSignInPage() binds a new session so I end up with a session despite redirecting to the stateless login page. Any ideas? CN -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Stateless-login-page-with-auth-roles-tp4668706.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Stateless login page with auth-roles
No, not directly, but it leads to the set() method of RestartResponseAtInterceptPageException's inner InterceptData class which calls bind(); https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java#L141 CN -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Stateless-login-page-with-auth-roles-tp4668706p4668709.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Stateless login page with auth-roles
OK. Then instead of using restartResponseAtSignInPage() just do: setResponsePage(getSignInPage()) Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Wed, Dec 10, 2014 at 11:46 AM, ChambreNoire a...@tentelemed.com wrote: No, not directly, but it leads to the set() method of RestartResponseAtInterceptPageException's inner InterceptData class which calls bind(); https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java#L141 CN -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Stateless-login-page-with-auth-roles-tp4668706p4668709.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Stateless login page with auth-roles
Yes I thought of that but it doesn't redirect to the loginpage (and results in WicketRuntimeExceptions - Error attaching this container for rendering - possibly because of a resulting page missmatch). I'm obviously missing something... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Stateless-login-page-with-auth-roles-tp4668706p4668712.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: stateless Login page!!
RestartResponseAtInterceptPageException explicitly binds session may be you are not binding your session yourself and your authorization strategy were redirecting you back to login page because there was not a permanent(http) session? On Tue, Sep 11, 2012 at 8:54 PM, Alfonso Quiroga alfonsose...@gmail.com wrote: It IS calling it (I've debugged it) and nothing happens. I could make it work replacing that line with this: throw new RestartResponseAtInterceptPageException(RealHomePage.class); Is this the solution? Why setReponsePage() is not working? thanks! On Tue, Sep 11, 2012 at 12:21 PM, Paul Bors p...@bors.ws wrote: Are you sure it's not calling the setReponsePage() (put break-point or a log message) and instead is trying to call the onError() method of your button or form? ~ Thank you, Paul Bors -Original Message- From: Alfonso Quiroga [mailto:alfonsose...@gmail.com] Sent: Tuesday, September 11, 2012 11:07 AM To: users@wicket.apache.org Subject: stateless Login page!! Hi, I have a stateless login page (statelessForm) and when the user login I do: protected void onSubmit() { [] setResponsePage(HomePage.class); } This was WORKING on wicket 1.5.RC7, but when I've changed to 1.5.7 or 1.5.8, it does not work, it just RELOADS the login page. What can I do instead of using setResponsePage() ?? thanks in advance - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- regards, Vineet Semwal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: stateless Login page!!
Are you sure it's not calling the setReponsePage() (put break-point or a log message) and instead is trying to call the onError() method of your button or form? ~ Thank you, Paul Bors -Original Message- From: Alfonso Quiroga [mailto:alfonsose...@gmail.com] Sent: Tuesday, September 11, 2012 11:07 AM To: users@wicket.apache.org Subject: stateless Login page!! Hi, I have a stateless login page (statelessForm) and when the user login I do: protected void onSubmit() { [] setResponsePage(HomePage.class); } This was WORKING on wicket 1.5.RC7, but when I've changed to 1.5.7 or 1.5.8, it does not work, it just RELOADS the login page. What can I do instead of using setResponsePage() ?? thanks in advance - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: stateless Login page!!
It IS calling it (I've debugged it) and nothing happens. I could make it work replacing that line with this: throw new RestartResponseAtInterceptPageException(RealHomePage.class); Is this the solution? Why setReponsePage() is not working? thanks! On Tue, Sep 11, 2012 at 12:21 PM, Paul Bors p...@bors.ws wrote: Are you sure it's not calling the setReponsePage() (put break-point or a log message) and instead is trying to call the onError() method of your button or form? ~ Thank you, Paul Bors -Original Message- From: Alfonso Quiroga [mailto:alfonsose...@gmail.com] Sent: Tuesday, September 11, 2012 11:07 AM To: users@wicket.apache.org Subject: stateless Login page!! Hi, I have a stateless login page (statelessForm) and when the user login I do: protected void onSubmit() { [] setResponsePage(HomePage.class); } This was WORKING on wicket 1.5.RC7, but when I've changed to 1.5.7 or 1.5.8, it does not work, it just RELOADS the login page. What can I do instead of using setResponsePage() ?? thanks in advance - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org