Added OAuth2 support for SSO

This commit is contained in:
Krzysztof Jagosz
2025-04-29 01:05:48 +02:00
parent 0e5550487e
commit 61b873451f
14 changed files with 454 additions and 37 deletions

View File

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