mirror of
https://github.com/freedbygrace/ActiveDirectoryManager.git
synced 2026-07-28 04:49:20 +00:00
Add LDAP authentication and dynamic group membership rules.
Replit-Commit-Author: Agent Replit-Commit-Session-Id: 705f2157-ef97-4fbd-89e4-8c7f2ecaea90 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ed01c5f-a82d-405a-b728-b2e3d127c60c/3dbf05fe-5071-4ef8-b5a9-67982811a801.jpg
This commit is contained in:
@@ -57,6 +57,25 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
||||
// Initialize Role Based Access Control system
|
||||
await initializeRBAC();
|
||||
|
||||
// Authentication info and providers
|
||||
app.get("/api/auth/providers", (req, res) => {
|
||||
const ldapEnabled = process.env.LDAP_ENABLED === "true";
|
||||
const oidcEnabled = process.env.OIDC_ENABLED === "true";
|
||||
|
||||
res.json({
|
||||
ldap: {
|
||||
enabled: ldapEnabled,
|
||||
connectionName: ldapEnabled ? process.env.LDAP_CONNECTION_NAME || "LDAP Authentication" : null
|
||||
},
|
||||
oidc: {
|
||||
enabled: oidcEnabled,
|
||||
providerName: oidcEnabled ? process.env.OIDC_PROVIDER_NAME || "Single Sign-On" : null
|
||||
},
|
||||
localEnabled: process.env.DISABLE_LOCAL_AUTH !== "true",
|
||||
registrationEnabled: process.env.DISABLE_REGISTRATION !== "true"
|
||||
});
|
||||
});
|
||||
|
||||
// Apply rate limiting middleware for API routes
|
||||
const apiLimiter = rateLimit({
|
||||
windowMs: 15 * 60 * 1000, // 15 minutes
|
||||
|
||||
Reference in New Issue
Block a user