Configuring centralized authentication system in my Ruby on Rails 4
application
I would like to create a centralized authentication system with my Ruby on
Rails 4 application. The idea here is that a service can be provided by my
application so that when I deploy Discourse, the open source forums, it
can authenticate against my existing Rails application. I went ahead and
looked up a cas solution and see one here:
https://github.com/dlindahl/omniauth-cas
In my application.rb, I added the following:
config.middleware.use OmniAuth::Builder do
provider :cas, login_url: 'http://localhost:3000/cas_login', host:
'localhost'
end
If I navigate my browser to http://localhost:3000/cas_login though, I get
an issue that the route has not been defined:
No route matches [GET] "/cas_login"
What's an ideal way to get CAS working either using this gem or another
for Rails 4 so that I can have a another application, such as Discourse,
auth with my existing user base?
No comments:
Post a Comment