Sha256: 1df8d399eb61dc9c95c493c7c8c9f6368f90afd9f99b113013e8c427623c5bb3
Contents?: true
Size: 1.14 KB
Versions: 22
Compression:
Stored size: 1.14 KB
Contents
require_relative './helpers/current_user_helpers' module SsoClyent class Engine < ::Rails::Engine isolate_namespace SsoClyent config.generators do |g| g.test_framework :rspec, :view_specs => false end config.sso_clyent = ActiveSupport::OrderedOptions.new initializer "sso_client.configure" do |app| should_load_sso_clyent = app.config.sso_clyent.try(:keys).try(:include?, :setup_omniauth) ? app.config.sso_clyent[:setup_omniauth] : true if should_load_sso_clyent SsoClyent.configure(app.config.sso_clyent) require 'sso_clyent/omniauth/strategies/sso' app.config.middleware.use OmniAuth::Builder do provider :sso, SsoClyent.provyder[:app_id], SsoClyent.provyder[:app_secret], { :callback_path => "#{SsoClyent.path}/auth/sso/callback", :path_prefix => "#{SsoClyent.path}/auth" }.merge(SsoClyent.ssl_config || {}) end end end initializer 'sso_clyent.extend_view_helpers' do |app| ActiveSupport.on_load :action_controller do helper SsoClyent::Helpers::CurrentUserHelpers end end end end
Version data entries
22 entries across 22 versions & 1 rubygems