From 2887b752acd7e20b83af39a7eb2a85add4f554c4 Mon Sep 17 00:00:00 2001 From: Daniel Miranda Date: Fri, 24 Apr 2015 09:27:48 -0300 Subject: [PATCH] [Colab] Enable RemoteUser Omniauth provider (for Colab) --- Gemfile | 3 +++ Gemfile.lock | 3 +++ app/models/user.rb | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index da45b1f..1f3f220 100644 --- a/Gemfile +++ b/Gemfile @@ -66,6 +66,9 @@ gem 'http_accept_language' # External logins with OmniAuth gem 'omniauth' +# Colab integration for Omniauth +gem 'omniauth-remote-user' + group :test do # Easier test writing gem "shoulda-matchers", '~> 2.8.0' diff --git a/Gemfile.lock b/Gemfile.lock index 83dfd27..5515c80 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -207,6 +207,8 @@ GEM omniauth (1.2.2) hashie (>= 1.2, < 4) rack (~> 1.0) + omniauth-remote-user (0.0.5) + omniauth (~> 1.0) orm_adapter (0.5.0) pg (0.18.2) poltergeist (1.6.0) @@ -359,6 +361,7 @@ DEPENDENCIES konacha mocha omniauth + omniauth-remote-user pg (~> 0.18.1) poltergeist (~> 1.6.0) rails (= 4.2.4) diff --git a/app/models/user.rb b/app/models/user.rb index c19aae2..d95619a 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -3,7 +3,7 @@ class User < ActiveRecord::Base # :token_authenticatable, :confirmable, # :lockable, :timeoutable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable, - :omniauthable, omniauth_providers: [] + :omniauthable, omniauth_providers: [:RemoteUser] validates :name, presence: true validates :email, presence: true, uniqueness: true -- libgit2 0.21.2