Add Authentik forward auth support

This commit is contained in:
Joker
2025-03-01 15:29:36 +08:00
parent 2e9d70da83
commit ebf6ad6600
9 changed files with 262 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
package main
import (
"imuslab.com/zoraxy/mod/auth/sso/authentik"
"log"
"net/http"
"os"
@@ -146,6 +147,13 @@ func startupSequence() {
Database: sysdb,
})
authentikRouter = authentik.NewAuthentikRouter(&authentik.AuthentikRouterOptions{
UseHTTPS: false, // Automatic populate in router initiation
AuthentikURL: "", // Automatic populate in router initiation
Logger: SystemWideLogger,
Database: sysdb,
})
//Create a statistic collector
statisticCollector, err = statistic.NewStatisticCollector(statistic.CollectorOption{
Database: sysdb,