diff options
Diffstat (limited to 'lib/gitlab/auth/request_authenticator.rb')
-rw-r--r-- | lib/gitlab/auth/request_authenticator.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/gitlab/auth/request_authenticator.rb b/lib/gitlab/auth/request_authenticator.rb index c6216fa9cad..d28ee54cfbc 100644 --- a/lib/gitlab/auth/request_authenticator.rb +++ b/lib/gitlab/auth/request_authenticator.rb @@ -49,9 +49,16 @@ module Gitlab private + def access_token + strong_memoize(:access_token) do + super || find_personal_access_token_from_http_basic_auth + end + end + def route_authentication_setting @route_authentication_setting ||= { - job_token_allowed: api_request? + job_token_allowed: api_request?, + basic_auth_personal_access_token: api_request? } end end |