support passing api token in Basic auth password (#12416)

This commit is contained in:
Dan Cech
2018-06-28 12:08:32 +02:00
committed by Torkel Ödegaard
parent c2381f088f
commit 3056d9a80e
3 changed files with 38 additions and 2 deletions

View File

@ -44,6 +44,14 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
The `Authorization` header value should be `Bearer <your api key>`.
The API Token can also be passed as a Basic authorization password with the special username `api_key`:
curl example:
```bash
?curl http://api_key:eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk@localhost:3000/api/org
{"id":1,"name":"Main Org."}
```
# Auth HTTP resources / actions
## Api Keys