Remove EE::API::APIGuard::HelperMethods
Summary
We have duplicated find_user_from_sources logic. FOSS :
def find_user_from_sources
find_user_from_access_token ||
find_user_from_job_token ||
find_user_from_warden
end
In the EE version we have find_user_from_bearer_token :
override :find_user_from_sources
def find_user_from_sources
find_user_from_bearer_token ||
find_user_from_job_token ||
find_user_from_warden
end
https://gitlab.com/gitlab-org/gitlab/blob/master/ee/lib/ee/api/api_guard.rb#L9-14
See related thread here !21120 (comment 255610353)
Improvements
- Reduce complexity by merging the functionality of the
find_user_from_bearer_tokenandfind_user_from_job_tokenmethods. - Reduce an unnecessary EE prepend
Risks
- This affects API authentication
Involved components
- API auth