IU-Libraries-Joint-Development/PagedMedia — pull request #27 by randalldfloyd (2014-06-02 13:36:50+00:00)
Title: HPT-28_Auth_with_IU_CAS

This pull request enables Omniauth and the omniauth-cas strategy
to allow login via IU CAS. It includes the following changes:

Gemfile:
Adds omniauth and omniauth-cas

app/controllers/users/omniauth_callbacks_controller.rb:
Handles the callback from omniauth to create a Devise user session and to persist
in DB on first login.

app/models/user.rb:
Makes the Devise user omniauthable

app/views/devise/shared/_links.erb:
Overrides the default Devise links partial so we have control over login links and labels

config/initializers/devise.rb:
Configures the :cas omniauth strategy using Devise config blocks

config/routes.rb:
Adds routes for the omniauth callback

Database schema change adds columns that require doing rake db:migrate

spec/features/iu_cas_spec.rb:
The Rspec test that uses ominiauth mocking capabilities to setup and test the callbacks

spec/support/omniauth.rb
Adds custom supporting methods specific to omniauth that can be used in specs