Commit a899a36023664cb7bc6d113fa4d0dfed6dafced8

Authored by Daniel
Committed by Rafael Reggiani Manzo
1 parent d510f6b8

[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
... ... @@ -210,6 +210,8 @@ GEM
210 210 omniauth (1.2.2)
211 211 hashie (>= 1.2, < 4)
212 212 rack (~> 1.0)
  213 + omniauth-remote-user (0.0.5)
  214 + omniauth (~> 1.0)
213 215 orm_adapter (0.5.0)
214 216 pg (0.18.3)
215 217 poltergeist (1.7.0)
... ... @@ -369,6 +371,7 @@ DEPENDENCIES
369 371 less-rails (~> 2.7.0)
370 372 mocha
371 373 omniauth
  374 + omniauth-remote-user
372 375 pg (~> 0.18.1)
373 376 poltergeist (~> 1.7.0)
374 377 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
... ...