Merge branch 'master' of ssh://gitlab.larvit.se:10022/power-plan/auth
This commit is contained in:
commit
2c82969152
|
@ -25,4 +25,5 @@ The account field "role" is a bit special, in that if it contains "admin" as one
|
||||||
## Some useful cURLs
|
## Some useful cURLs
|
||||||
|
|
||||||
Obtain an admin GWT: `curl -d '"api-key-goes-here"' -H "Content-Type: application/json" -i http://localhost:4000/auth/api-key`
|
Obtain an admin GWT: `curl -d '"api-key-goes-here"' -H "Content-Type: application/json" -i http://localhost:4000/auth/api-key`
|
||||||
Use a bearer token to make a call: `curl -H "Content-Type: application/json" -H "Authorization: bearer your-JWT-token-goes-here" -i http://localhost:4000/account/{accountID}`
|
Use a bearer token to make a call: `curl -H "Content-Type: application/json" -H "Authorization: bearer your-JWT-token-goes-here" -i http://localhost:4000/account/{accountID}`
|
||||||
|
Create account: `curl -d '{"name": "Bosse", "password":"Hemligt", "fields": [{ "name":"role", "values":["user"]}]}' -H "Content-Type: application/json" -H "Authorization: bearer your-JWT-token-goes-here" -i http://localhost:4000/account`
|
||||||
|
|
Loading…
Reference in New Issue
Block a user