annotationsatharvard / catcha

Catch-A - Catching Annotation: An annotation backend and API.
http://catcha.readthedocs.io
20 stars 9 forks source link

Allow admin to generate API access token from the dashboard #61

Closed jmiranda closed 9 years ago

jmiranda commented 9 years ago

Generate a JSON web token generate token

jmiranda commented 9 years ago

Verify the generated JSON web token verify token

jmiranda commented 9 years ago

Use the generated JSON web token to make a request against the Search API:

curl -i -X GET -H "Content-Type: application/json" -H "x-annotator-auth-token:eyJhbGciOiJIUzI1NiIsImN0eSI6InRleHRcL3BsYWluIiwidHlwIjoiSldTIn0.eyJjb25zdW1lcktleSI6ImVlYjIwZWMwLWI4ZGQtNDBhZS1iM2RlLTE0ODcwYWZmOTJjNiIsImlzc3VlZEF0IjoiMjAxNS0wNS0wNlQwMzoxNDo0MS0wNDAwIiwidXNlcklkIjoiYWRtaW4iLCJqdGkiOiI5OTI3ODEzZi0yZWFiLTQ0ZWItYjUwOC05YmE4ZGIzZGEzMGQiLCJ0dGwiOjg2NDAwLCJpYXQiOjE0MzA5Mzk2ODF9.yOj4jsxteCSfW0XhfUW8mfp3gtQyz7VPJhwdpzQZdug" "http://localhost:8080/catch/annotator/search?limit=10"