mirror of
https://github.com/alibaba/arthas.git
synced 2024-04-21 10:21:39 +00:00
update auth.md
This commit is contained in:
@@ -46,6 +46,8 @@ Authentication result: true
|
||||
|
||||
### http api验证
|
||||
|
||||
|
||||
#### Authorization Header方式(推荐)
|
||||
Arthas 采用的是 HTTP 标准的 Basic Authorization,客户端请求时增加对应的header即可。
|
||||
|
||||
* 参考:[https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication)
|
||||
@@ -57,4 +59,14 @@ Arthas 采用的是 HTTP 标准的 Basic Authorization,客户端请求时增
|
||||
curl 'http://localhost:8563/api' \
|
||||
-H 'Authorization: Basic YWRtaW46YWRtaW4=' \
|
||||
--data-raw '{"action":"exec","command":"version"}'
|
||||
```
|
||||
```
|
||||
|
||||
#### URL 参数传递方式
|
||||
|
||||
为了方便各种特殊情况,支持了以 parameters 方式传递username和password。比如:
|
||||
|
||||
```bash
|
||||
curl 'http://localhost:8563/api?password=admin' \
|
||||
--data-raw '{"action":"exec","command":"version"}'
|
||||
```
|
||||
|
||||
|
||||
@@ -45,6 +45,8 @@ After success, you can directly connect to the web console.
|
||||
|
||||
### HTTP API Authentication
|
||||
|
||||
#### HTTP Authorization Header(recommended)
|
||||
|
||||
Arthas uses the HTTP standard Basic Authorization.
|
||||
|
||||
* Reference: [https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication)
|
||||
@@ -55,4 +57,13 @@ For example, if the user name is: `admin` and the password is `admin`, the combi
|
||||
curl 'http://localhost:8563/api' \
|
||||
-H 'Authorization: Basic YWRtaW46YWRtaW4=' \
|
||||
--data-raw '{"action":"exec","command":"version"}'
|
||||
```
|
||||
|
||||
#### URL parameters
|
||||
|
||||
It supports passing username and password in parameters. such as:
|
||||
|
||||
```bash
|
||||
curl 'http://localhost:8563/api?password=admin' \
|
||||
--data-raw '{"action":"exec","command":"version"}'
|
||||
```
|
||||
Reference in New Issue
Block a user