Sha256: 8d286bea46f81ff17f8d891e1f938b434124780cba1ea39a9039be06c2866a17

Contents?: true

Size: 754 Bytes

Versions: 1

Compression:

Stored size: 754 Bytes

Contents

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|      
      if app.config.sso_clyent.setup_omniauth
        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"
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sso_clyent-0.0.5 lib/sso_clyent/engine.rb