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:
committed by
Jesus Federico
parent
042a4738f4
commit
5d56d10bb9
BIN
app/assets/images/cas-normal.png
Normal file
BIN
app/assets/images/cas-normal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
@ -23,10 +23,6 @@ class SessionsController < ApplicationController
|
||||
if Rails.application.config.omniauth_ldap
|
||||
redirect_to "#{relative_root}/auth/ldap"
|
||||
end
|
||||
#If SAML is enabled, just route to it instead.
|
||||
if Rails.application.config.omniauth_saml
|
||||
redirect_to "#{relative_root}/auth/saml"
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
|
@ -49,6 +49,18 @@
|
||||
</div>
|
||||
<% 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>
|
||||
<% end %>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user