• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Question Regarding Session ID's and Cookies
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question Regarding Session ID's and Cookies


  • Subject: Re: Question Regarding Session ID's and Cookies
  • From: Neil MacLennan <email@hidden>
  • Date: Mon, 26 Jul 2004 01:07:53 +0100

> Is it possible for a client to be using an active session, leave the site momentarily and when they return have the session restored.

Whilst I haven't done exactly what you're asking (I use SessionIDs in the URL), I have reconstructed a Session from a sessionID String. So I guess if you can get the sessionID out of the cookie, then you can reconstruct the Session. Sorry, I've been a bit lazy and not looked at the code for cookies to complete your question, but I can do if you need further help.

private Session session = (Session) application().restoreSessionWithID(sid, this.context());

where "sid" is a String containing the sessionID e.g. "gIy4xkxblFbZlkXbIjIPeg". It uses: restoreSessionWithID(String aSessionID, WOContext aContext) from WOApplication. So if you can get this String out of the cookie then you can restore the Session and I guess just discard the one that WO automatically creates when the user returns. The usual caveats about the Session timing-out still stands if the user takes too long surfing outside your application.

neilmac
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: Display Groups
  • Next by Date: Re: Display Groups
  • Previous by thread: Question Regarding Session ID's and Cookies
  • Next by thread: Firefox and a directAction
  • Index(es):
    • Date
    • Thread