跳到主内容

Thingsboard

Deploy Casdoor first (see Server installation). Then configure the application and Thingsboard as below.

步骤1:配置Casdoor应用

  1. 创建一个新的Casdoor应用或使用现有的应用。
  2. 添加重定向URL:http://CASDOOR_HOSTNAME/login Casdoor应用设置
  3. Note the Client ID and Client secret for the following steps.

步骤2:在Casdoor中添加用户

Create a user and assign a role to the application.

Go to UsersAdd user to open the new-user page.

在添加用户名并选择组织“Thingsboard”后保存用户(其他详细信息可选)。

Set a password via "Manage your password".

为用户选择一个密码并确认它。

步骤3:准备和构建Thingsboard应用

首先,Thingsboard只支持Java 11 (OpenJDK)。

Download from:

JDK下载页面

要启动Thingsboard,请按照以下步骤操作(适用于Windows系统):

  • 下载并解压包。 下载包
  • 根据您的偏好在\thingsboard\conf\thingsboard.yml中配置Thingsboard,包括Kafka、PostgreSQL等的配置。
  • 在Thingsboard文件夹的命令行中运行install.bat –loadDemo以安装并添加演示数据。 Casdoor应用设置
  • 在命令行中运行net start thingsboard以启动Thingsboard。 您应该看到以下输出: Casdoor Application Setting

步骤4:集成Casdoor

Now open http://localhost:8080/ and log in to the admin account:

Account: sysadmin@thingsboard.org / Password: sysadmin

成功登录后,点击页面左下角的OAuth2按钮。

Casdoor应用设置

按照以下方式填写空白:

Casdoor Application Setting

Obtain these values from: OIDC discovery URL Casdoor应用设置

填写这些空白后,您已经成功将Casdoor与Thingsboard集成。 When you log in to http://localhost:8080/, you should see the following:

Casdoor应用设置