Skip to main content

Using Casdoor in ShenYu

ShenYu has a Casdoor plugin to enable the use of Casdoor.

Step 1: Deploy Casdoor

Firstly, Casdoor should be deployed. You can refer to the official Casdoor documentation for Server Installation.

After a successful deployment, please ensure that:

After following the above steps, you can quickly implement a Casdoor-based login page in your app with the following steps.

Step 2: Configure the Casdoor application

  1. Create a new Casdoor application or use an existing one
  2. Add your redirect URLCasdoor Application Settings
  3. On the certificate editing page, you can view your CertificateCasdoor Certification Settings

Step 3: Use the Casdoor plugin in ShenYu

1. Configure the Casdoor plugin in ShenYu

Shenyu Plugin Configuration

Note: As ShenYu only has a single line input box, \n must be added in every line of certificate. Casdoor Certification Settings

You can copy it and paste it into the certificate of the ShenYu Casdoor config.

You don't need to save it in the Casdoor certificate editing page, as it is only for copying.

2. Configure the ShenYu Casdoor plugin

Shenyu Casdoor Config You can configure what you need for the Casdoor config.

3. Getting the service and using it

3.1 Directly visit the Web

Shenyu Fail Login

3.2 Use Casdoor Login

Shenyu Login Shenyu Successful Login

3.3 Carry the token in Headers

Shenyu Token

3.4 Save name, ID and organization in Headers

This makes it easier to use them in the future.