Module: API::Helpers::PackagesManagerClientsHelpers

Extended by:
Grape::API::Helpers
Includes:
PackagesHelpers
Defined in:
lib/api/helpers/packages_manager_clients_helpers.rb

Constant Summary

Constants included from PackagesHelpers

API::Helpers::PackagesHelpers::MAX_PACKAGE_FILE_SIZE

Instance Method Summary collapse

Methods included from PackagesHelpers

#authorize_create_package!, #authorize_destroy_package!, #authorize_packages_access!, #authorize_read_package!, #authorize_upload!, #authorize_workhorse!, #package_event, #require_dependency_proxy_enabled!, #require_packages_enabled!

Instance Method Details

#find_deploy_token_from_http_basic_authObject


19
20
21
22
23
24
25
26
27
# File 'lib/api/helpers/packages_manager_clients_helpers.rb', line 19

def find_deploy_token_from_http_basic_auth
  return unless request.headers

  token = decode_token

  return unless token

  DeployToken.active.find_by_token(token)
end

#find_job_from_http_basic_authObject


9
10
11
12
13
14
15
16
17
# File 'lib/api/helpers/packages_manager_clients_helpers.rb', line 9

def find_job_from_http_basic_auth
  return unless request.headers

  token = decode_token

  return unless token

  ::Ci::AuthJobFinder.new(token: token).execute
end