[annotator-dev] annotator and authentication

Randall Leeds tilgovi at hypothes.is
Tue Jan 28 21:20:32 UTC 2014


You may still want to use that cookie to authorize the /token route and get
the user object you will use to generate the access token.

See the documentation here:
http://docs.annotatorjs.org/en/latest/authentication.html


On Tue, Jan 28, 2014 at 1:04 PM, Graham Hukill <ghukill at gmail.com> wrote:

> Randall,
>
> Thank you so much for your response.
>
>>  > I've poked around a bit, seen the g.user field, defined by MockUser
>> function, etc. etc.  I'm just wondering what a low barrier option for
>> passing a username to this would be, aka, where I can catch a request.form
>> variable and associate it.
>>
>> The consumer class determines the user id from the auth token in the
>> X-Annotator-Auth-Token header. The user class, like MockUser, ties this id
>> to your user data.
>>
> This is where I was stuck for the majority of the time, figuring out how
> client-side user information was passed back to the annotator-store.  I
> noticed quite a bit later that run.py has notes in it about utilizing
> sessions or headers to catch this information.  I ended up passing this
> information via a cookie I already had established, but this sounds like a
> good, if not better, option.
>
> Thank you again,
> Graham
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20140128/a428410f/attachment-0004.html>


More information about the annotator-dev mailing list