Debian SSO login fixed
This commit is contained in:
parent
4846573304
commit
e0b3721804
2 changed files with 2 additions and 5 deletions
|
|
@ -25,7 +25,7 @@ class ApplicationController < ActionController::Base
|
||||||
# Only run if the user is not yet logged in
|
# Only run if the user is not yet logged in
|
||||||
if not user_signed_in?
|
if not user_signed_in?
|
||||||
if debian_sso_dn = request.env['HTTP_X_DEBIAN_SSO_DN']
|
if debian_sso_dn = request.env['HTTP_X_DEBIAN_SSO_DN']
|
||||||
debian_sso_dn =~ /\/CN=(.+)/
|
debian_sso_dn =~ /^CN=(.+),/
|
||||||
debian_email = $1
|
debian_email = $1
|
||||||
|
|
||||||
@user = User.where(provider: 'debian-sso', email: debian_email).first_or_create do |user|
|
@user = User.where(provider: 'debian-sso', email: debian_email).first_or_create do |user|
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,7 @@ http {
|
||||||
}
|
}
|
||||||
|
|
||||||
location @backend {
|
location @backend {
|
||||||
|
proxy_set_header x_debian_sso_dn $ssl_client_s_dn;
|
||||||
proxy_pass http://127.0.0.1:3000;
|
proxy_pass http://127.0.0.1:3000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -113,10 +114,6 @@ http {
|
||||||
expires 1h;
|
expires 1h;
|
||||||
add_header X-Coffee images;
|
add_header X-Coffee images;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /debian_sso/ {
|
|
||||||
#
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue