So you want to auto-login a user, persist it in the database and give
him a cookie that makes it work across requests?
This is to log the user in:
SessionManager session_manager = DatabaseSessionsFactory.getInstance
(datasource);
String authid = session_manager.startSession(userid, getRemoteAddr(),
false);
This is to set the cookie:
Cookie authcookie = new Cookie("authid", authid);
authcookie.setPath("/");
setCookie(authcookie);
Hope this is what you wanted.
Geert
On 15-aug-05, at 06:20, Keith Lea wrote:
I asked this on IRC but I couldn't figure it out using the answer
JR Boyens gave me. I'd like to pretend that a user just
authenticated using DB authentication. It's not for testing. I
think I need to set a cookie or something. How do I do this?
Thanks,
-Keith
_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users
--
Geert Bevin Uwyn bvba
"Use what you need" Avenue de Scailmont 34
http://www.uwyn.com 7170 Manage
gbevin[remove] at uwyn dot com Tel +32 64 84 80 03
PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9
Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net
_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users