gitlab_database.rb 369 B

1234567891011121314
  1. class GitlabDatabase < OmniAuth::Strategies::GitLab
  2. option :name, 'gitlab'
  3. def initialize(app, *args, &block)
  4. # database lookup
  5. config = Setting.get('auth_gitlab_credentials') || {}
  6. args[0] = config['app_id']
  7. args[1] = config['app_secret']
  8. args[2][:client_options] = args[2][:client_options].merge(config.symbolize_keys)
  9. super
  10. end
  11. end