Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit d55a9c0

Browse files
authored
doc: doc for casdoor (#47)
1 parent 83c5ef9 commit d55a9c0

7 files changed

Lines changed: 84 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
to you under the Apache License, Version 2.0 (the
88
"License"); you may not use this file except in compliance
99
with the License. You may obtain a copy of the License at
10-
1110
http://www.apache.org/licenses/LICENSE-2.0
12-
1311
Unless required by applicable law or agreed to in writing,
1412
software distributed under the License is distributed on an
1513
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -37,7 +35,9 @@ IoTDB-Workbench是IoTDB的可视化管理工具,可对IoTDB的数据进行增
3735

3836
[前端服务运行说明](frontend/README.md)
3937

38+
## Casdoor运行
4039

40+
[Casdoor单点登录运行说明](casdoor.md)
4141

4242

4343
## Docker

README_zh.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
to you under the Apache License, Version 2.0 (the
88
"License"); you may not use this file except in compliance
99
with the License. You may obtain a copy of the License at
10-
1110
http://www.apache.org/licenses/LICENSE-2.0
12-
1311
Unless required by applicable law or agreed to in writing,
1412
software distributed under the License is distributed on an
1513
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -36,4 +34,6 @@ IotDB-Workbench是IotDB的可视化管理工具,可对IotDB的数据进行增
3634

3735
[前端服务运行说明](frontend/README.md)
3836

37+
## Casdoor运行
3938

39+
[Casdoor单点登录运行说明](casdoor.md)
53.2 KB
Loading
31 KB
Loading

backend/doc/image/frontSwitch.png

6.45 KB
Loading

backend/doc/image/iotdb.gif

464 KB
Loading

casdoor.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<!--
2+
3+
Licensed to the Apache Software Foundation (ASF) under one
4+
or more contributor license agreements. See the NOTICE file
5+
distributed with this work for additional information
6+
regarding copyright ownership. The ASF licenses this file
7+
to you under the Apache License, Version 2.0 (the
8+
"License"); you may not use this file except in compliance
9+
with the License. You may obtain a copy of the License at
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
Unless required by applicable law or agreed to in writing,
12+
software distributed under the License is distributed on an
13+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
KIND, either express or implied. See the License for the
15+
specific language governing permissions and limitations
16+
under the License.
17+
18+
-->
19+
20+
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
21+
![](https://img.shields.io/badge/java--language-1.8-blue.svg)
22+
23+
# Casdoor
24+
25+
Casdoor can simply connect to [Apache IoTDB](https://github.com/apache/iotdb).
26+
27+
Because the code for connecting casdoor has been added in [Apache IoTDB Web Workbench](https://github.com/apache/iotdb-web-workbench), we just need to configure application.yml in back-end and open front switch.
28+
29+
## Step1. Deploy Casdoor
30+
31+
Firstly, the Casdoor should be deployed.
32+
33+
You can refer to the Casdoor official documentation for the [Server Installation](/docs/basic/server-installation).
34+
35+
After a successful deployment, you need to ensure:
36+
37+
- The Casdoor server is successfully running on **http://localhost:8000**.
38+
- Open your favorite browser and visit **http://localhost:7001**, you will see the login page of Casdoor.
39+
- Input `admin` and `123` to test login functionality is working fine.
40+
41+
Then you can quickly implement a Casdoor-based login page in your own app with the following steps.
42+
43+
## Step2. Configure Casdoor
44+
45+
Configure casdoor can refer to [casdoor](https://door.casdoor.com/login)(Configure casdoor's browser better not use one browser as your develop browser).
46+
47+
You also should configure an organization and an application. You also can refer to [casdoor](https://door.casdoor.com/login).
48+
49+
### 2.1 you should create an organization
50+
51+
![organization](/backend/doc/image/editOrganization.png)
52+
53+
### 2.2 you should create an application
54+
55+
![application](/backend/doc/image/editApplication.png)
56+
57+
## Step3. Open Apache IoTDB Web Workbench front-end switch
58+
59+
Open this switch to make code and state send to back-end.
60+
61+
This switch in the iotdb-web-workbench/fronted/.env
62+
63+
![frontSwitch](/backend/doc/image/frontSwitch.png)
64+
65+
## Step4. Configure back-end code
66+
67+
You should configure casdoor's Configuration in the iotdb-web-workbench/backend/src/main/resources/application.properties
68+
69+
```ini
70+
casdoor.endpoint = http://localhost:8000
71+
casdoor.clientId = <client id in previous step>
72+
casdoor.clientSecret = <client Secret in previous step>
73+
casdoor.certificate=<client certificate in previous step>
74+
casdoor.organizationName=IoTDB
75+
casdoor.applicationName=app-IoTDB
76+
```
77+
78+
## Result
79+
80+
![result](/backend/doc/image/iotdb.gif)

0 commit comments

Comments
 (0)