Skip to content

Commit

Permalink
fix: move to public-api
Browse files Browse the repository at this point in the history
  • Loading branch information
dacongda committed Aug 18, 2024
1 parent b6493ea commit 11deb60
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 23 deletions.
9 changes: 8 additions & 1 deletion docs/basic/public-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,21 @@ The below examples shows how to call `GetOAuthToken()` function in Go via casdoo
#### 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?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 Down
21 changes: 0 additions & 21 deletions docs/user/api-key.md

This file was deleted.

1 change: 0 additions & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ module.exports = {
"user/multi-factor-authentication",
"user/roles",
"user/permissions",
"user/api-key",
],
},
{
Expand Down
File renamed without changes

0 comments on commit 11deb60

Please sign in to comment.