File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ class SamlController < ApplicationController
22 skip_before_action :verify_authenticity_token , :only => [ :acs , :logout ]
33
44 def index
5- @attrs = [ ]
5+ @attrs = { }
66 end
77
88 def sso
@@ -21,13 +21,13 @@ def acs
2121 response = OneLogin ::RubySaml ::Response . new ( params [ :SAMLResponse ] )
2222 response . settings = Account . get_saml_settings
2323
24- logger . info "NAMEID: #{ response . name_id } "
25-
2624 if response . is_valid?
2725 session [ :user_id ] = response . name_id
2826 session [ :attributes ] = response . attributes
2927 @attrs = session [ :attributes ]
30- redirect_to root_path
28+ logger . info "Sucessfully logged"
29+ logger . info "NAMEID: #{ response . name_id } "
30+ render :action => :index
3131 else
3232 render :action => :fail
3333 end
Original file line number Diff line number Diff line change 11<% if session[:user_id].present? %>
2- <p > Logged in.</ p >
2+ <p > Logged in. <%= session [ :user_id ] %> </ p >
33
44 <% if @attrs . any? %>
5- < p > You have the following attributes:</ p >
5+ < p > Received the following attributes in the SAML Response :</ p >
66 < table > < thead > < th > Name</ th > < th > Values</ th > </ thead > < tbody >
77
88 <% @attrs . each do |key , attr_value | %>
You can’t perform that action at this time.
0 commit comments