[annotator-dev] how to implement identity and authz - V2.0

Ning, Yifan yin2 at pitt.edu
Tue Nov 3 14:21:39 UTC 2015


Hi,


Based on annotator 2.0, I am trying to assign user name and permission to annotation via identity and authz modules. For now, I stored user account and permission information in Mysql and got user name on client side.


I am new to annotator and kind of stuck on using identity and authz module. Docs in V2.x is limited (http://docs.annotatorjs.org/en/latest/api/authz.html#annotator.authz.acl).


I will be great appreciate if any body give me hint or example of use identity and authz?


For module identity

I tried put user name to identity but nothing affected after annotation created:

app.include(annotator.identity.simple);

app.start().then(function ()
             {  app.ident.identity = getCookie('username');

                app.annotations.load();

    }


For module authz

I don't know how to bring the module below in and feeds parameters



annotator.authz.AclAuthzPolicy.prototype.permits(action, context, identity)



Best wishes,

Yifan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20151103/89a6bd41/attachment-0003.html>


More information about the annotator-dev mailing list