Tomas Doran schreef:

On 14 Feb 2010, at 11:43, Christiaan Kras wrote:

In a RESTful application I'm working I'd like to be able to load a session based on the sessionid which is sent with the HTTP headers.

It's perfectly arguable that you just failed at REST.

http://www.prescod.net/rest/mistakes/
Thanks for the link and preventing me from some big mistakes in the beginning of my application. Not using sessions makes a lot more sense indeed.

The application will, at a later stadium, get a webinterface as well so I'd still like to use cookies, except for the RESTful part I want to be able to choose.

Do HTTP auth (Catalyst::Authentication::Credential::HTTP) in the RESTful part, and use standard password & cookies for the non-restful part.

You just configure 2 different realms in your authentication config, and call $c->authenticate with a realm parameter..
Will do! This will actually make things easier.

Cheers
t0m


_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to