forked from External/greenlight
Enableing SAML auth co-exist with other OAuth services (#215)
* Enableing SAML auth co-exist with other OAuth services * removing cert file
This commit is contained in:
parent
042a4738f4
commit
5d56d10bb9
2
Gemfile
2
Gemfile
|
@ -17,7 +17,7 @@ gem 'uglifier', '>= 1.3.0'
|
||||||
# Use CoffeeScript for .coffee assets and views
|
# Use CoffeeScript for .coffee assets and views
|
||||||
gem 'coffee-rails', '~> 4.2'
|
gem 'coffee-rails', '~> 4.2'
|
||||||
# See https://github.com/rails/execjs#readme for more supported runtimes
|
# See https://github.com/rails/execjs#readme for more supported runtimes
|
||||||
# gem 'therubyracer', platforms: :ruby
|
gem 'therubyracer', platforms: :ruby
|
||||||
|
|
||||||
# Use jquery as the JavaScript library
|
# Use jquery as the JavaScript library
|
||||||
gem 'jquery-rails'
|
gem 'jquery-rails'
|
||||||
|
|
|
@ -100,6 +100,7 @@ GEM
|
||||||
json (1.8.6)
|
json (1.8.6)
|
||||||
json (1.8.6-java)
|
json (1.8.6-java)
|
||||||
jwt (1.5.6)
|
jwt (1.5.6)
|
||||||
|
libv8 (3.16.14.19-x86_64-linux)
|
||||||
listen (3.0.8)
|
listen (3.0.8)
|
||||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||||
rb-inotify (~> 0.9, >= 0.9.7)
|
rb-inotify (~> 0.9, >= 0.9.7)
|
||||||
|
@ -214,6 +215,7 @@ GEM
|
||||||
rb-fsevent (0.10.2)
|
rb-fsevent (0.10.2)
|
||||||
rb-inotify (0.9.10)
|
rb-inotify (0.9.10)
|
||||||
ffi (>= 0.5.0, < 2)
|
ffi (>= 0.5.0, < 2)
|
||||||
|
ref (2.0.0)
|
||||||
request_store (1.4.0)
|
request_store (1.4.0)
|
||||||
rack (>= 1.4)
|
rack (>= 1.4)
|
||||||
ruby-saml (1.4.3)
|
ruby-saml (1.4.3)
|
||||||
|
@ -252,6 +254,9 @@ GEM
|
||||||
sqlite3 (1.3.13-x64-mingw32)
|
sqlite3 (1.3.13-x64-mingw32)
|
||||||
sqlite3 (1.3.13-x86-mingw32)
|
sqlite3 (1.3.13-x86-mingw32)
|
||||||
sqlite3 (1.3.13-x86-mswin32-60)
|
sqlite3 (1.3.13-x86-mswin32-60)
|
||||||
|
therubyracer (0.12.3)
|
||||||
|
libv8 (~> 3.16.14.15)
|
||||||
|
ref
|
||||||
thor (0.20.0)
|
thor (0.20.0)
|
||||||
thread_safe (0.3.6)
|
thread_safe (0.3.6)
|
||||||
thread_safe (0.3.6-java)
|
thread_safe (0.3.6-java)
|
||||||
|
@ -320,6 +325,7 @@ DEPENDENCIES
|
||||||
spring
|
spring
|
||||||
spring-watcher-listen (~> 2.0.0)
|
spring-watcher-listen (~> 2.0.0)
|
||||||
sqlite3
|
sqlite3
|
||||||
|
therubyracer
|
||||||
turbolinks (~> 5)
|
turbolinks (~> 5)
|
||||||
tzinfo-data
|
tzinfo-data
|
||||||
uglifier (>= 1.3.0)
|
uglifier (>= 1.3.0)
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
|
@ -23,10 +23,6 @@ class SessionsController < ApplicationController
|
||||||
if Rails.application.config.omniauth_ldap
|
if Rails.application.config.omniauth_ldap
|
||||||
redirect_to "#{relative_root}/auth/ldap"
|
redirect_to "#{relative_root}/auth/ldap"
|
||||||
end
|
end
|
||||||
#If SAML is enabled, just route to it instead.
|
|
||||||
if Rails.application.config.omniauth_saml
|
|
||||||
redirect_to "#{relative_root}/auth/saml"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|
|
@ -49,6 +49,18 @@
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% if omniauth_providers_configured(:saml) %>
|
||||||
|
<%= link_to omniauth_login_url(:saml), class: "signin-link signin-link-google" do %>
|
||||||
|
<div class="signin-button center-block">
|
||||||
|
<div class="signin-icon-wrapper">
|
||||||
|
<%= image_tag("cas-normal.png", alt: "Login with SAML", class: "signin-icon") %>
|
||||||
|
</div>
|
||||||
|
<div class="signin-text-wrapper text-center">
|
||||||
|
<span class="signin-text"><%= t('signin_text', provider: 'SAML') %></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue