class OmniAuth::Strategies::Shibboleth
Public Instance Methods
callback_phase()
click to toggle source
Calls superclass method
# File lib/omniauth/strategies/shibboleth.rb, line 47 def callback_phase if options[:debug] # dump attributes return [ 200, { 'Content-Type' => 'text/plain' }, ["!!!!! This message is generated by omniauth-shibboleth. To remove it set :debug to false. !!!!!\n#{request_params.sort.map {|i| "#{i[0]}: #{i[1]}" }.join("\n")}"] ] end return fail!(:no_shibboleth_session) unless (request_param(options.shib_session_id_field.to_s) || request_param(options.shib_application_id_field.to_s)) return fail!(:empty_uid) if options[:fail_with_empty_uid] && option_handler(options.uid_field).empty? super end
option_handler(option_field)
click to toggle source
# File lib/omniauth/strategies/shibboleth.rb, line 63 def option_handler(option_field) if option_field.class == String || option_field.class == Symbol request_param(option_field.to_s) elsif option_field.class == Proc option_field.call(self.method(:request_param)) end end
request_param(key)
click to toggle source
# File lib/omniauth/strategies/shibboleth.rb, line 36 def request_param(key) case options[:request_type] when :env, 'env' request.env[key] when :header, 'header' request.env["HTTP_#{key.upcase.gsub('-', '_')}"] when :params, 'params' request.params[key] end end
request_params()
click to toggle source
# File lib/omniauth/strategies/shibboleth.rb, line 27 def request_params case options[:request_type] when :env, 'env', :header, 'header' request.env when :params, 'params' request.params end end
request_phase()
click to toggle source
# File lib/omniauth/strategies/shibboleth.rb, line 16 def request_phase [ 302, { 'Location' => script_name + callback_path + query_string, 'Content-Type' => 'text/plain' }, ["You are being redirected to Shibboleth SP/IdP for sign-in."] ] end