gitlab_database.rb 463 B

12345678910111213141516
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class OmniAuth::Strategies::GitLabDatabase < OmniAuth::Strategies::GitLab
  3. option :name, 'gitlab'
  4. def initialize(app, *args, &)
  5. # database lookup
  6. config = Setting.get('auth_gitlab_credentials') || {}
  7. args[0] = config['app_id']
  8. args[1] = config['app_secret']
  9. args[2][:client_options] = args[2][:client_options].merge(config.symbolize_keys)
  10. super
  11. end
  12. end