This pull request introduces Casdoor authentication support to the project. The changes span across multiple files, including the addition of new routes, services, and UI elements to handle Casdoor authentication. Additionally, some existing functionality has been refactored to accommodate these new features.
Authentication Enhancements:
lobe/src/App.tsx: Added a new route for Casdoor authentication (/auth/casdoor).
This pull request introduces Casdoor authentication support to the project. The changes span across multiple files, including the addition of new routes, services, and UI elements to handle Casdoor authentication. Additionally, some existing functionality has been refactored to accommodate these new features.
Authentication Enhancements:
lobe/src/App.tsx
: Added a new route for Casdoor authentication (/auth/casdoor
).lobe/src/pages/auth/page.tsx
: ImportedgetCasdoorToken
and added theCasdoor
function to handle Casdoor authentication. [1] [2]lobe/src/services/AuthorizeService.ts
: Added thegetCasdoorToken
function to handle token retrieval for Casdoor authentication.UI Updates:
lobe/src/pages/login/page.tsx
: Added a new button and logic to handle Casdoor login, including checking if Casdoor authentication is enabled. [1] [2] [3] [4]lobe/src/pages/setting/features/SystemSetup.tsx
: Added new input fields and switches for configuring Casdoor settings in the system setup page. [1] [2] [3] [4] [5]Backend Support:
src/Thor.Abstractions/Dtos/CasdoorUserDto.cs
: Added new DTO classes for Casdoor user data.src/Thor.Core/DataAccess/SettingExtensions.cs
: Added new constants and settings for Casdoor integration. [1] [2]src/Thor.Service/Program.cs
: Added a new endpoint for Casdoor authentication.src/Thor.Service/Service/AuthorizeService.cs
: Imported necessary libraries for Casdoor integration.