diff options
author | lain <lain@soykaf.club> | 2019-11-19 13:16:49 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-11-19 13:16:49 +0000 |
commit | bf89e0bf38d9709f6dd331f5d9b326575994423d (patch) | |
tree | 8d5fbb12d85a8cef9fb1ee8a111346861f4f6050 /docs/configuration | |
parent | 06151776c0c2c529a1bd3b4866162794c141e95f (diff) | |
parent | 36686f52457454841c6b9c85a137eabeb1e739fc (diff) | |
download | pleroma-bf89e0bf38d9709f6dd331f5d9b326575994423d.tar.gz pleroma-bf89e0bf38d9709f6dd331f5d9b326575994423d.zip |
Merge branch 'feature/admin-api/support-token-header' into 'develop'
Admin API: Support authentication via `x-admin-token` HTTP header
Closes #1430
See merge request pleroma/pleroma!1993
Diffstat (limited to 'docs/configuration')
-rw-r--r-- | docs/configuration/cheatsheet.md | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/docs/configuration/cheatsheet.md b/docs/configuration/cheatsheet.md index d798bd692..07d9a1d45 100644 --- a/docs/configuration/cheatsheet.md +++ b/docs/configuration/cheatsheet.md @@ -656,7 +656,7 @@ Feel free to adjust the priv_dir and port number. Then you will have to create t ### :admin_token -Allows to set a token that can be used to authenticate with the admin api without using an actual user by giving it as the 'admin_token' parameter. Example: +Allows to set a token that can be used to authenticate with the admin api without using an actual user by giving it as the `admin_token` parameter or `x-admin-token` HTTP header. Example: ```elixir config :pleroma, :admin_token, "somerandomtoken" @@ -664,8 +664,14 @@ config :pleroma, :admin_token, "somerandomtoken" You can then do -```sh -curl "http://localhost:4000/api/pleroma/admin/invite_token?admin_token=somerandomtoken" +```shell +curl "http://localhost:4000/api/pleroma/admin/users/invites?admin_token=somerandomtoken" +``` + +or + +```shell +curl -H "X-Admin-Token: somerandomtoken" "http://localhost:4000/api/pleroma/admin/users/invites" ``` ### :auth |