Hi.
I have written a WEB application where you have to login first. To make things more user-friendly, I would like to enable optional auto-login feature. The username and encrypted password would be stored in a cookie. I have figured how do store and read back cookies, but I wouldn't know how to skip the login screen. My Login class extends WAComponent, and in its renderContentsOn: I'm reading the cookie. The problem is that you cannot #call another component while rendering. You also cannot register a WATask as an application. How would you do it? -- Milan Mimica http://sparklet.sf.net _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi Milan,
I have just done something similar. I decided to not have a fully automatic login. I have a login screen with a "remember me" checkbox. If I find the cookie, I fill in the userId/password and check the box. The user is free to change anything on the screen. If the login button is clicked and the "remember me" checkbox is not checked, I kill the cookie. If the login is successful and the "remember me" checkbox is checked, I refresh the cookie. I know this is not exactly what you are asking but if you like it, your question goes away. Lou >Hi. >I have written a WEB application where you have to login first. To make >things more user-friendly, I would like to enable optional auto-login >feature. The username and encrypted password would be stored in a >cookie. I have figured how do store and read back cookies, but I >wouldn't know how to skip the login screen. >My Login class extends WAComponent, and in its renderContentsOn: I'm >reading the cookie. The problem is that you cannot #call another >component while rendering. You also cannot register a WATask as an >application. How would you do it? Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon mailto:[hidden email] http://www.Keystone-Software.com _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
You can look at the code of Pier and how it is done there ...
The basic idea is that you override #initialRequest: in your root component, query the request object for the authentication cookie and modify the session state if the login is valid. Lukas On 1 August 2011 21:23, Louis LaBrunda <[hidden email]> wrote: > Hi Milan, > > I have just done something similar. I decided to not have a fully > automatic login. I have a login screen with a "remember me" checkbox. If > I find the cookie, I fill in the userId/password and check the box. The > user is free to change anything on the screen. If the login button is > clicked and the "remember me" checkbox is not checked, I kill the cookie. > If the login is successful and the "remember me" checkbox is checked, I > refresh the cookie. > > I know this is not exactly what you are asking but if you like it, your > question goes away. > > Lou > >>Hi. >>I have written a WEB application where you have to login first. To make >>things more user-friendly, I would like to enable optional auto-login >>feature. The username and encrypted password would be stored in a >>cookie. I have figured how do store and read back cookies, but I >>wouldn't know how to skip the login screen. >>My Login class extends WAComponent, and in its renderContentsOn: I'm >>reading the cookie. The problem is that you cannot #call another >>component while rendering. You also cannot register a WATask as an >>application. How would you do it? > ----------------------------------------------------------- > Louis LaBrunda > Keystone Software Corp. > SkypeMe callto://PhotonDemon > mailto:[hidden email] http://www.Keystone-Software.com > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -- Lukas Renggli www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Louis LaBrunda
I was going to do this too, but then I figured browsers can do this on
their own. Louis LaBrunda wrote: > Hi Milan, > > I have just done something similar. I decided to not have a fully > automatic login. I have a login screen with a "remember me" checkbox. If > I find the cookie, I fill in the userId/password and check the box. The > user is free to change anything on the screen. If the login button is > clicked and the "remember me" checkbox is not checked, I kill the cookie. > If the login is successful and the "remember me" checkbox is checked, I > refresh the cookie. > > I know this is not exactly what you are asking but if you like it, your > question goes away. > > Lou > > >> Hi. >> I have written a WEB application where you have to login first. To make >> things more user-friendly, I would like to enable optional auto-login >> feature. The username and encrypted password would be stored in a >> cookie. I have figured how do store and read back cookies, but I >> wouldn't know how to skip the login screen. >> My Login class extends WAComponent, and in its renderContentsOn: I'm >> reading the cookie. The problem is that you cannot #call another >> component while rendering. You also cannot register a WATask as an >> application. How would you do it? >> > ----------------------------------------------------------- > Louis LaBrunda > Keystone Software Corp. > SkypeMe callto://PhotonDemon > mailto:[hidden email] http://www.Keystone-Software.com > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > -- Milan Mimica http://sparklet.sf.net _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by mmimica
On 01 Aug 2011, at 21:04, Milan Mimica wrote: You also cannot register a WATask as an application. That's not true. You can register a WATask as an application. Johan _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |