Merge pull request #568 from JokerQyou/feature/authentik-forward-auth

[WIP] Add Authentik forward auth support
This commit is contained in:
Toby Chui
2025-03-31 20:05:52 +08:00
committed by GitHub
9 changed files with 262 additions and 2 deletions

View File

@@ -116,6 +116,7 @@ func ReverseProxtInit() {
WebDirectory: *path_webserver,
AccessController: accessController,
AutheliaRouter: autheliaRouter,
AuthentikRouter: authentikRouter,
LoadBalancer: loadBalancer,
PluginManager: pluginManager,
/* Utilities */
@@ -587,6 +588,8 @@ func ReverseProxyHandleEditEndpoint(w http.ResponseWriter, r *http.Request) {
newProxyEndpoint.AuthenticationProvider.AuthMethod = dynamicproxy.AuthMethodAuthelia
} else if authProviderType == 3 {
newProxyEndpoint.AuthenticationProvider.AuthMethod = dynamicproxy.AuthMethodOauth2
} else if authProviderType == 4 {
newProxyEndpoint.AuthenticationProvider.AuthMethod = dynamicproxy.AuthMethodAuthentik
} else {
newProxyEndpoint.AuthenticationProvider.AuthMethod = dynamicproxy.AuthMethodNone
}