Skip to content

Commit

Permalink
docs: Add docs for the new feature of accessKey and secretKey (#631)
Browse files Browse the repository at this point in the history
* docs: Add docs for the new feature of accessKey and secretKey

* fix: fix format error

* fix: move to public-api

* fix: fix linter err
  • Loading branch information
dacongda authored Aug 18, 2024
1 parent 5332e4e commit 7241ac3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/basic/public-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,22 @@ We can use the access key and access secret for a Casdoor user to call `Casdoor

#### How to authenticate?

1. HTTP `GET` parameter, the URL format is:
1. Create a pair of accessKey and accessSecret in account setting page.

2. HTTP `GET` parameter, the URL format is:

```shell
/page?accessKey=<The user's access key>&accessSecret=<the user's access secret>"
```
Demo site example: `https://door.casdoor.com/api/get-global-providers?accessKey=b86db9dc-6bd7-4997-935c-af480dd2c796/admin&accessSecret=79911517-fc36-4093-b115-65a9741f6b14`
![User Api Key](/img/basic/user_api_key.png)
```bash
curl --location 'http://door.casdoor.com/api/user?accessKey=b86db9dc-6bd7-4997-935c-af480dd2c796&accessSecret=79911517-fc36-4093-b115-65a9741f6b14'
```
### 4. By `username` and `password`
:::caution
Expand Down
Binary file added static/img/basic/user_api_key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7241ac3

Please sign in to comment.