OmniAuth CAS Login
This gem contains the CAS Login strategy for OmniAuth.
Before You Begin
You should have already installed OmniAuth into your app; if not, read the OmniAuth README to get started.
Using This Strategy
First start by adding this gem to your Gemfile:
gem 'omniauth-cas-login'
If you need to use the gem locally from source, place the root folder in 'vendor/gems' and add the following line instead:
gem 'omniauth-cas-login', :path => 'vendor/gems/omniauth-cas-login'
Next, tell OmniAuth about this provider. For a Rails app, your config/initializers/omniauth.rb file should look like this:
Rails.application.config.middleware.use OmniAuth::Builder do
provider :cas_login, "CLIENT_KEY", "CLIENT_SECRET", {
:client_options => {
:site => "SITE_URL", # E.g. https://example.com
:authorize_url => "AUTHORIZE_URL", # Relative auth path from "SITE_URL", e.g. /authorize
:token_url => "TOKEN_URL", # Relative path to obtain token from "SITE URL", e.g. /token
:profile_url => "PROFILE_URL" # Relative path to get user's profile, e.g. /profile
}
end
Replace the parameters above with the appropriate values you obtained from the login provider.