Commit 09deeefb7bb87db6103137450990ca157f5d17d7

Authored by Daniel
Committed by Diego Camarinha
1 parent 34280adf

[Colab] Enable RemoteUser Omniauth provider (for Colab)

Showing 3 changed files with 7 additions and 1 deletions   Show diff stats
Gemfile
... ... @@ -70,6 +70,9 @@ gem 'js-routes', '~> 1.1.0'
70 70 # External logins with OmniAuth
71 71 gem 'omniauth'
72 72  
  73 +# Colab integration for Omniauth
  74 +gem 'omniauth-remote-user'
  75 +
73 76 group :test do
74 77 # Easier test writing
75 78 gem "shoulda-matchers", '~> 2.8.0'
... ...
Gemfile.lock
... ... @@ -200,6 +200,8 @@ GEM
200 200 omniauth (1.2.2)
201 201 hashie (>= 1.2, < 4)
202 202 rack (~> 1.0)
  203 + omniauth-remote-user (0.0.5)
  204 + omniauth (~> 1.0)
203 205 orm_adapter (0.5.0)
204 206 pg (0.18.2)
205 207 poltergeist (1.6.0)
... ... @@ -357,6 +359,7 @@ DEPENDENCIES
357 359 less-rails (~> 2.7.0)
358 360 mocha
359 361 omniauth
  362 + omniauth-remote-user
360 363 pg (~> 0.18.1)
361 364 poltergeist (~> 1.6.0)
362 365 rails (= 4.2.4)
... ...
app/models/user.rb
... ... @@ -3,7 +3,7 @@ class User &lt; ActiveRecord::Base
3 3 # :token_authenticatable, :confirmable,
4 4 # :lockable, :timeoutable and :omniauthable
5 5 devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable,
6   - :omniauthable, omniauth_providers: []
  6 + :omniauthable, omniauth_providers: [:RemoteUser]
7 7  
8 8 validates :name, presence: true
9 9 validates :email, presence: true, uniqueness: true
... ...