Added some curl examples
This commit is contained in:
parent
a36ec47324
commit
7e90c8b66d
|
@ -17,3 +17,8 @@ On first startup with a clean database, an account with name "admin" and the fie
|
||||||
## Special account field: "role"
|
## Special account field: "role"
|
||||||
|
|
||||||
The account field "role" is a bit special, in that if it contains "admin" as one of its values, that grants access to all methods on all accounts on this service. It might be a good idea to use the field "role" for authorization throughout your services.
|
The account field "role" is a bit special, in that if it contains "admin" as one of its values, that grants access to all methods on all accounts on this service. It might be a good idea to use the field "role" for authorization throughout your services.
|
||||||
|
|
||||||
|
## 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`
|
||||||
|
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}`
|
Loading…
Reference in New Issue
Block a user