Refactoring: Resolved vendor/lib/* path by moving OmniAuth custom authentication backends to lib/omniauth/.

This commit is contained in:
Jens Pfeifer 2019-10-28 08:51:22 +01:00 committed by Thorsten Eckel
parent 8d45328d32
commit 67d3f35b05
12 changed files with 11 additions and 11 deletions

View file

@ -1,3 +1,9 @@
Dir[ Rails.root.join('lib', 'omniauth', '*') ].each do |file|
if File.file?(file)
require file
end
end
Rails.application.config.middleware.use OmniAuth::Builder do
# twitter database connect

View file

@ -1,6 +0,0 @@
# load all vendor/lib extentions
Dir[ Rails.root.join('vendor', 'lib', '*') ].each do |file|
if File.file?(file)
require file
end
end

View file

@ -12,11 +12,11 @@ class SamlDatabase < OmniAuth::Strategies::SAML
assertion_consumer_service_url = "#{http_type}://#{fqdn}/auth/saml/callback"
config = Setting.get('auth_saml_credentials') || {}
options = config.reject { |k,v| v.blank? }
.merge(
:assertion_consumer_service_url => assertion_consumer_service_url,
:issuer => entity_id,
)
options = config.reject { |_k, v| v.blank? }
.merge(
assertion_consumer_service_url: assertion_consumer_service_url,
issuer: entity_id,
)
args[0] = options