[annotator-dev] Annotations Not Being Stored With Associated User

Randall Leeds randall at bleeds.info
Fri May 20 19:44:45 UTC 2016

For posterity:

This seems solved after conversation on the issue tracker.

Annotation creation authorized with a user's consumer key and secret a) can
specify any username (not just the key/secret owner) and b) are separately
stored from other annotations in the AnnotateIt / amnotator-store backends.
This allows a user to register, retrieve their secret, and then create an
application that handles its own user registration and authentication,
handing out tokens signed by this secret at their discretion.

To see these annotations in the API you must pass a token in the headers
that uses the same consumer key.

On Tue, May 17, 2016, 15:02 Kelsey Ferencz <kelsey at concentrekgroup.com>

> I am using Annotate 1.2 with AnnotateIt storage. I have generated a token
> with consumerKey (from my account), userId, issuedAt, and ttl, as well as
> the secret, and verified it against jwt.io to make sure it is returning
> the correct data. This token is then provided in the token area for the
> Auth plugin. Code below:
> var content = $('body').annotator();
> content.annotator('addPlugin', 'Auth', {
>   tokenUrl: '/auth/token',
>   token: 'TOKENREMOVED',
>   autoFetch: true
> });
> content.annotator('addPlugin', 'Store', {
>   prefix: 'http://annotateit.org/api',
> });
> content.annotator('addPlugin', 'Permissions', {
>     user: 'kferencz',
>     permissions: {
>       'read':   [],
>       'update': [],
>       'delete': [],
>       'admin':  []
>     }
> });`
> When I do this, the annotations "stick" and if I reload the page, I can
> see the annotations with the username "kferencz" attached. I can continue
> to make updates and add new annotations.
> However, if I log into my kferencz account, or I try to query that
> username through the API, no results show up/there are no annotations. What
> would be causing this? The annotations have to be stored somewhere for them
> to be "sticking" and showing up for others accessing the site, so I'm
> confused as to what is going on here. Any help?? I was trying to debug the
> annotations, but couldn't figure out how to print the raw annotations in my
> console either. Any help would be appreciated. I would like to, down the
> line, be able to query all annotations by kferencz and display them, so I'm
> not sure what step is being missed here.
> Kelsey
> _______________________________________________
> annotator-dev mailing list
> annotator-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/annotator-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20160520/792c343d/attachment-0004.html>

More information about the annotator-dev mailing list