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:
Bruck Wubete
2018-05-03 11:18:43 -04:00
committed by Jesus Federico
parent 042a4738f4
commit 5d56d10bb9
5 changed files with 19 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -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

View File

@ -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>