Files
discourse/spec/components
Blake Erickson f03b293e6a FEATURE: Header based auth for API requests (#7129)
Now you can also make authenticated API requests by passing the
`api_key` and `api_username` in the HTTP header instead of query params.

The new header values are: `Api-key` and `Api-Username`.

Here is an example in cURL:

``` text
curl -i -sS -X POST "http://127.0.0.1:3000/categories" \
  -H "Content-Type: multipart/form-data;" \
  -H "Api-Key: 7aa202bec1ff70563bc0a3d102feac0a7dd2af96b5b772a9feaf27485f9d31a2" \
  -H "Api-Username: system" \
  -F "name=7c1c0ed93583cba7124b745d1bd56b32" \
  -F "color=49d9e9" \
  -F "text_color=f0fcfd"
```

There is also support for `Api-User-Id` and `Api-User-External-Id`
instead of specifying the username along with the key.
2019-03-08 09:13:31 -07:00
..
2017-07-28 10:20:09 +09:00
2019-01-25 17:00:30 +00:00
2018-01-30 08:54:37 +11:00
2017-07-28 10:20:09 +09:00
2017-07-28 10:20:09 +09:00
2019-03-08 12:45:03 +02:00
2018-07-05 15:34:58 +10:00
2018-04-18 11:32:32 +05:30