Configuring middleware using Ruby on Rails 4 -
i interested in using omniauth cas in ruby on rails 4 project. particular gem i'm looking @ one: https://github.com/dlindahl/omniauth-cas
the documentation says configure cas excerpt looks following:
rails.application.config.middleware.use omniauth::builder provider :cas, host: 'cas.yourdomain.com' end
my question go in context of ruby on rails 4 application? file config placed in? additional need done use middleware in ruby on rails 4? tried adding following in application.rb
, getting complaints no route matches [get] "/cas_login":
config.middleware.use omniauth::builder provider :cas, login_url: 'http://localhost:3000/cas_login', host: 'localhost', port: 3000 end
this code should placed in initializer @ config/initializers/cas_middleware.rb
.
alternatively, put syntax inside class of config/application.rb
block:
config.middleware.use omniauth::builder provider :cas, host: 'cas.yourdomain.com' end
and same thing.
Comments
Post a Comment