Commit 01b4bea0 authored by Douwe Maan's avatar Douwe Maan

Satisfy Rubocop

parent 6ff10340
...@@ -26,7 +26,8 @@ module Grack ...@@ -26,7 +26,8 @@ module Grack
auth! auth!
if project && authorized_request? if project && authorized_request?
response = if ENV['GITLAB_GRACK_AUTH_ONLY'] == '1' response =
if ENV['GITLAB_GRACK_AUTH_ONLY'] == '1'
# Tell gitlab-git-http-server the request is OK, and what the GL_ID is # Tell gitlab-git-http-server the request is OK, and what the GL_ID is
render_grack_auth_ok render_grack_auth_ok
else else
...@@ -74,7 +75,8 @@ module Grack ...@@ -74,7 +75,8 @@ module Grack
# the response even if it's not a 401 status # the response even if it's not a 401 status
status, headers, body = response status, headers, body = response
headers['WWW-Authenticate'] = spnego_challenge headers['WWW-Authenticate'] = spnego_challenge
return [status, headers, body]
[status, headers, body]
end end
def valid_auth_method? def valid_auth_method?
...@@ -253,7 +255,8 @@ module Grack ...@@ -253,7 +255,8 @@ module Grack
gss = GSSAPI::Simple.new(nil, nil, Gitlab.config.kerberos.keytab) gss = GSSAPI::Simple.new(nil, nil, Gitlab.config.kerberos.keytab)
# the GSSAPI::Simple constructor transforms a nil service name into a default value, so # the GSSAPI::Simple constructor transforms a nil service name into a default value, so
# pass service name to acquire_credentials explicitly to support the special meaning of nil # pass service name to acquire_credentials explicitly to support the special meaning of nil
gss_service_name = if Gitlab.config.kerberos.service_principal_name.present? gss_service_name =
if Gitlab.config.kerberos.service_principal_name.present?
gss.import_name(Gitlab.config.kerberos.service_principal_name) gss.import_name(Gitlab.config.kerberos.service_principal_name)
else else
nil # accept any valid service principal name from keytab nil # accept any valid service principal name from keytab
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment