proxyauth: user OpenID instead of basic auth

This commit is contained in:
Johannes Zellner
2024-04-15 12:35:03 +02:00
parent caf1c37171
commit 21d7438bbe
5 changed files with 70 additions and 2 deletions

View File

@@ -303,7 +303,7 @@ server {
proxy_set_header Content-Length "";
}
location ~ ^/(login|logout)$ {
location ~ ^/(login|logout|callback)$ {
proxy_pass http://127.0.0.1:3001;
}
@@ -314,7 +314,7 @@ server {
if ($http_user_agent ~* "container") {
return 401;
}
return 302 /login?redirect=$request_uri;
return 302 "https://<%= proxyAuth.oidcEndpoint %>/openid/auth?client_id=<%= proxyAuth.oidcClientId %>&scope=openid profile email&response_type=code&redirect_uri=https://<%= vhost %>/callback";
}
location <%= proxyAuth.location %> {