Commit ae06ea33 authored by James Lopez's avatar James Lopez

Override oath token finder

parent ecf209b5
...@@ -5,6 +5,7 @@ module EE ...@@ -5,6 +5,7 @@ module EE
module Auth module Auth
module UserAuthFinders module UserAuthFinders
extend ActiveSupport::Concern extend ActiveSupport::Concern
extend ::Gitlab::Utils::Override
JOB_TOKEN_HEADER = "HTTP_JOB_TOKEN".freeze JOB_TOKEN_HEADER = "HTTP_JOB_TOKEN".freeze
JOB_TOKEN_PARAM = :job_token JOB_TOKEN_PARAM = :job_token
...@@ -22,6 +23,17 @@ module EE ...@@ -22,6 +23,17 @@ module EE
job.user job.user
end end
override :find_oauth_access_token
def find_oauth_access_token
return if scim_request?
super
end
def scim_request?
current_request.path.starts_with?("/api/scim/")
end
end end
end end
end end
......
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