跳到主内容

Pulsar manager

Casdoor 可以轻松连接到 Pulsar Manager。

The code for connecting Casdoor has already been added to Pulsar Manager, so we just need to configure the application.properties file in the back-end and the Casdoor settings in the front-end.

步骤 1:部署 Casdoor​

部署 Casdoor. 见 服务器安装。 Ensure the server is running and you can sign in at the Casdoor login page as built-in/admin with the password that you set. See Sign in to the admin console.

步骤 2:配置 Casdoor​

在 Casdoor 中配置组织和应用(见 应用 和 组织)。

步骤 2.1:创建一个组织​

organization

步骤 2.2:创建一个应用​

application

Step 3: Configure the Pulsar Manager front-end​

登录页面有一个 Login with casdoor 按钮,它在登录后将 code 和 state 发送到后端。

在 pulsar-manager/front-end/src/main.js 的 config 对象中配置 Casdoor 设置。

const config = {
serverUrl: "http://localhost:7001",
clientId: "<client id from previous step>",
organizationName: "pulsar",
appName: "app-pulsar",
redirectPath: "/#callback",
};

步骤 4:配置后端代码​

在 pulsar-manager/src/main/resources/application.properties 中配置 Casdoor 的设置。

casdoor.endpoint = http://localhost:8000
casdoor.clientId = <client id from previous step>
casdoor.clientSecret = <client secret from previous step>
casdoor.certificate = <client certificate from previous step>
casdoor.organizationName = pulsar
casdoor.applicationName = app-pulsar