[okfn-labs] Cookie-Auth for API requests

Gregor Aisch gregor.aisch at okfn.org
Thu Aug 2 13:17:53 UTC 2012


Not sure if that's necessary. I already managed to get the cookie accessible from the subdomain by setting the REMEMBER_COOKIE_DOMAIN setting to ".pybossa.vis4.net" in settings_local.py. The JavaScript can now read the remember_token to get the user name etc.

Still, the requests fired to POST /api/taskrun don't care about the cookie and store the result as guest user. Maybe I need to get the api_key from somewhere and append it to the api calls?




Am 02.08.2012 um 13:59 schrieb Friedrich Lindenberg:

> Would it actually make sense for pyBossa to become an OpenID
> provider/relay? I though OID 2.0 had options for working directly with
> client apps (which I guess a JS-only front-end is).
> 
> Cheers,
> 
> - Friedrich
> 
> On Thu, Aug 2, 2012 at 1:58 PM, Gregor Aisch <gregor.aisch at okfn.org> wrote:
>> 
>> Btw, the one thing that I couldn't get working currently is authentication.
>> Even though I put my pybossa-apps instance inside a sub-domain of the
>> pybossa instance, PyBossa ignores the cookie and treats the taks runs as if
>> there were submitted by an anonymous user.
>> 
>> Any ideas?
>> 
>> 
>> 
>> _______________________________________________
>> okfn-labs mailing list
>> okfn-labs at lists.okfn.org
>> http://lists.okfn.org/mailman/listinfo/okfn-labs
>> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/okfn-labs/attachments/20120802/60edac7c/attachment-0002.html>


More information about the okfn-labs mailing list