[annotator-dev] Problem with tokenUrl and annotator-store

Randall Leeds tilgovi at hypothes.is
Fri Jul 27 01:02:29 UTC 2012


On Jul 26, 2012 7:51 PM, "Kartik Subbarao" <subbarao at computer.org> wrote:
>
> On 07/26/2012 08:32 PM, Randall Leeds wrote:
>>
>>  > I see that dev.html specifies tokenUrl as
>> http://localhost:5000/api/token, however the annotator-store instance
>> doesn't seem to define the /api/token endpoint. Am I missing something
>> in the configuration for annotator-store?
>>
>> Not in the annotator-store, but in the store plugin. You need to specify
>> the tokenUrl option in the Auth plugin.
>
>
> But dev.html does specify tokenUrl -- it's set to
http://localhost:5000/api/token. And dev.html also specifies
localhost:5000/api as the store prefix:
>
> .addPlugin('Store', {
>             prefix: 'http://localhost:5000/api',
>
> From this, I'm assuming that annotate-store running on localhost:5000 is
supposed to handle all /api/* requests, including /api/token. But it
doesn't seem to handle /api/token.
>
> I know some part of my assumption here must be wrong, but I don't know
what part :-)
>
> Thanks,
>
>         -Kartik
>
>

Ah, right. I should have noticed sooner. Your mistake is assuming that
annotator-store issues tokens at all, but that part is up to your
application since it has to do with user accounts. It is how you hook your
application's authentication up to the store. Information account this is
on the wiki for okfn/annotator (not store) under authentication. You can
also see okfn/annotateit or hypothesis/h for sample implementations.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20120726/a9551d16/attachment-0002.html>


More information about the annotator-dev mailing list