JigneshGohel-BoTreeConsulting/mentor_mentee — pull request #1 by MaheshGajera (2013-01-29 09:17:40+00:00)
Title:         Added Linked-In Login feature which allow user to login into the

applications using user's Linked-In Account. Used devise's
omniauth. Basic core programming for login added.

============= Added (6)

/app/controllers/users/omniauth_callbacks_controller.rb
/app/models/authentication.rb
/db/migrate/20130126222824_create_authentications.rb
/lib/mentor_mentee_helpers/auth/external_provider.rb
/test/fixtures/authentications.yml
/test/unit/authentication_test.rb

============= Updated (12)
/Gemfile
- Added gems for liinked omniauth
gem 'omniauth'
gem 'omniauth-linkedin'

/app/models/user.rb
- Added relation to Authentication model
has_many :authentications, dependent: :delete_all
- Added Devise's omniauthable feature
- Added methods to support omniauth
apply_omniauth
connected_to_linkedin

/app/views/users/sessions/new.html.haml
- Added link to login via Linked-In

/config/initializers/devise.rb
- Added OmniAuth Linked-In configurations
config.omniauth :linkedin, Settings.omniauth.linkedin.key, Settings.omniauth.linkedin.secret, omniauth_options

/config/locales/en.yml
- Added external login messages
external_login{disconnect, errors}

/config/routes.rb
- Configured devise for omniauth_callbacks
devise_for :users, controllers: { omniauth_callbacks: "users/omniauth_callbacks" }
- Added devise scope
get '/users/auth/:provider/disconnect' => "users/omniauth_callbacks#disconnect", as: :auth_disconnect

/config/settings.yml
- Added omniauth settings for linkedin

/db/schema.rb
- Added following table:
a) authentications