From f3fdcb220f4e433f8008f506e3a7557d032f7f42 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 70ed184..216be6a 100644 --- a/Gemfile +++ b/Gemfile @@ -70,6 +70,9 @@ gem 'js-routes', '~> 1.1.0' # 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 27f9172..502f7f8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -206,6 +206,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.3) poltergeist (1.7.0) @@ -365,6 +367,7 @@ DEPENDENCIES less-rails (~> 2.7.0) mocha omniauth + omniauth-remote-user pg (~> 0.18.1) poltergeist (~> 1.7.0) rails (= 4.2.4) diff --git a/app/models/user.rb b/app/models/user.rb index 4ee39ea..b0fb4b4 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