nesh170 / asap-inventory-system

This is a concept inventory system for ECE458. It is built by ASAPsolutions
1 stars 0 forks source link

added api-key support for tokens #97

Closed nesh170 closed 7 years ago

nesh170 commented 7 years ago

Gets a new api-key or returns the old one 🗡

@ankitkayastha please remove TokenHasReadWriteScope from permissions for requests (was worried about massive merge conflicts), the updated IsAdminOrReadOnlyhandles this case :D

GET /api/user/auth/token HTTP/1.1 Host: localhost:8000 Content-Type: application/json Authorization: Bearer

Response:

{
  "token": "<alphanumeric_tokenz>"
}

In order to use:- Do a header for:- Authorization: Token