Ignore:
Timestamp:
Feb 3, 2015, 6:01:27 PM (9 years ago)
Author:
casties
Branch:
default
Message:

upped version to 0.5.
can use display name and groups from auth token.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorAnnotations.java

    r75 r88  
    1 /**
    2  * Implements the "annotations" uri of the Annotator API. see
    3  * <https://github.com/okfn/annotator/wiki/Storage>
    4  */
    51package de.mpiwg.itgroup.annotations.restlet;
    62
     
    8884
    8985        // do authentication
    90         Person authUser = Person.createPersonWithId(this.checkAuthToken(entity));
     86        Person authUser = getUserFromAuthToken(entity);
    9187        logger.fine("request authenticated=" + authUser);
    9288
     
    173169
    174170        // do authentication TODO: who's allowed to create?
    175         Person authUser = Person.createPersonWithId(this.checkAuthToken(entity));
     171        Person authUser = getUserFromAuthToken(entity);
    176172        logger.fine("request authenticated=" + authUser);
    177173        if (authUser == null) {
     
    190186            // make sure id is not set for POST
    191187            jo.remove("id");
    192             // get Annotation object from posted JSON
     188            // create Annotation object from posted JSON
    193189            annot = createAnnotation(jo, entity);
    194190        } catch (IOException e1) {
     
    231227
    232228        // do authentication
    233         Person authUser = Person.createPersonWithId(this.checkAuthToken(entity));
     229        Person authUser = getUserFromAuthToken(entity);
    234230        logger.fine("request authenticated=" + authUser);
    235231
     
    294290
    295291        // do authentication
    296         Person authUser = Person.createPersonWithId(this.checkAuthToken(entity));
     292        Person authUser = getUserFromAuthToken(entity);
    297293        logger.fine("request authenticated=" + authUser);
    298294        AnnotationStore store = getAnnotationStore();
Note: See TracChangeset for help on using the changeset viewer.