docbrown/app/helpers/authentication_helper.rb
rhymes 014ec65e6b
Add multiple select to authentication providers configuration (#7609)
* Add multiple select to authentication providers configuration

* Remove hardcoded providers from SiteConfig
2020-04-30 17:28:08 +02:00

17 lines
490 B
Ruby

module AuthenticationHelper
def authentication_provider(provider_name)
Authentication::Providers.get!(provider_name)
end
def authentication_available_providers
Authentication::Providers.available.map do |provider_name|
Authentication::Providers.const_get(provider_name.to_s.titleize)
end
end
def authentication_enabled_providers
Authentication::Providers.enabled.map do |provider_name|
Authentication::Providers.get!(provider_name)
end
end
end