Skip to content

Commit

Permalink
fix: fix linter err
Browse files Browse the repository at this point in the history
  • Loading branch information
dacongda committed Aug 18, 2024
1 parent 11deb60 commit 8321c3c
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions docs/basic/public-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,21 +87,14 @@ The below examples shows how to call `GetOAuthToken()` function in Go via casdoo
#### How to authenticate?
1. Create a pair of accessKey and accessSecret in account setting page.
2. HTTP `GET` parameter, the URL format is:
1. HTTP `GET` parameter, the URL format is:
```shell
/page?clientId=<The client ID>&clientSecret=<the client secret>
```

Demo site example: `https://door.casdoor.com/api/get-global-providers?clientId=294b09fbc17f95daf2fe&clientSecret=dd8982f7046ccba1bbd7851d5c1ece4e52bf039d`

![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'
```

2. [HTTP Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication), the HTTP header format is:

```shell
Expand All @@ -116,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

0 comments on commit 8321c3c

Please sign in to comment.