Skip to content

Commit

Permalink
Improve Casdoor config docs
Browse files Browse the repository at this point in the history
hsluoyz committed Dec 9, 2023
1 parent b19cec6 commit 84d78d2
Showing 2 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions docs/basic/casdoor-sso.md
Original file line number Diff line number Diff line change
@@ -10,9 +10,9 @@ import styles from '.././styles.module.css';
import CasdoorCard from "@site/src/components/CasdoorCard";
```

Casibase uses Casdoor as its backend service,so make sure to deploy it in advance.
Casibase uses Casdoor as its identity and single-sign-on (SSO) provider. Make sure to deploy it in advance.

Please refer to: <https://casdoor.org/docs/basic/server-installation> to install and configure Casdoor.
Please refer to [Casdoor Server Installation](https://casdoor.org/docs/basic/server-installation) to install and configure Casdoor.

Follow these steps to setup Casdoor for casibase:

34 changes: 17 additions & 17 deletions docs/basic/server-installation.md
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ All major operating systems including Windows, Linux and macOS are supported.
The use of Casibase is divided into two steps:

- step1: [Deploy and run Casdoor](https://casdoor.org/docs/basic/server-installation)
- step2: [Deploy and run Casibase](https://casibase.org/)
- step2: Deploy and run Casibase (this docs)

We strongly suggest you use [Yarn 1.x](https://classic.yarnpkg.com/en/docs/install) to run & build Casdoor&Casibase frontend, using NPM might cause UI styling issues, see more details at: [casdoor#294](https://github.com/casdoor/casdoor/issues/294)

@@ -51,10 +51,10 @@ Casibase uses [XORM](https://xorm.io/) to talk to the database. Based on [Xorm D

The source code of Casibase is hosted at GitHub: <https://github.com/casbin/casibase>. Both the Go backend code and React frontend code are inside the single repository.

Name | Description | Language | Source code
----|----------------------------------|----|----
Frontend | Web frontend UI for Casibase | JavaScript + React | <https://github.com/casbin/casibase/tree/master/web>
Backend | RESTful API backend for Casibase | Golang + Beego + XORM | <https://github.com/casbin/casibase>
| Name | Description | Language | Source code |
|----------|----------------------------------|-----------------------|------------------------------------------------------|
| Frontend | Web frontend UI for Casibase | JavaScript + React | <https://github.com/casbin/casibase/tree/master/web> |
| Backend | RESTful API backend for Casibase | Golang + Beego + XORM | <https://github.com/casbin/casibase> |

Casibase supports `Go Modules`. To download the code, you can just simply clone the code via git:

@@ -67,7 +67,7 @@ git clone https://github.com/casbin/casibase

### Configure Casdoor

Please refer to: <https://casibase.org/docs/basic/casdoor-sso> to configure Casdoor.
Please refer to [Casdoor-SSO](/docs/basic/casdoor-sso) section to configure Casdoor.

Remember your `clientId``clientSecret``organization``application` and so on in Casdoor configuration, we will use them later.

@@ -133,23 +133,23 @@ dbName = casibase

Casibase supports custom configuration, you can modify the configuration file `conf/app.conf` to change the configuration.

- Backend (casibase\conf\app.conf)
- Backend (conf/app.conf)

```ini
casdoorEndpoint = http://localhost:8000
clientId = <Your_clientId_in_Casdoor_configuration>
clientSecret = <Your_clientSecret_in_Casdoor_configuration>
casdoorOrganization = casibase
casdoorApplication = app-casibase
casdoorEndpoint = <Your Casdoor endpoint>
clientId = <Your Casdoor application's client ID>
clientSecret = <Your Casdoor application's client secret>
casdoorOrganization = <Your Casdoor organization name>
casdoorApplication = <Your Casdoor application name>
```

- Frontend (casibase\web\src\Conf.js)
- Frontend (web/src/Conf.js)

```js
serverUrl: "http://localhost:7001"
clientId: "<Your_clientId_in_Casdoor_configuration>"
appName: "app-casibase"
organizationName: "casibase"
serverUrl: "<Your Casdoor endpoint>"
clientId: "<Your Casdoor application's client ID>"
appName: "<Your Casdoor application name>"
organizationName: "<Your Casdoor organization name>"
```

## Run

0 comments on commit 84d78d2

Please sign in to comment.