Class: OmniAuth::Strategies::Shibboleth
- Inherits:
-
Object
- Object
- OmniAuth::Strategies::Shibboleth
- Includes:
- OmniAuth::Strategy
- Defined in:
- lib/omniauth/strategies/shibboleth.rb
Instance Method Summary collapse
- #callback_phase ⇒ Object
- #request_param(key) ⇒ Object
- #request_params ⇒ Object
- #request_phase ⇒ Object
Instance Method Details
#callback_phase ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/omniauth/strategies/shibboleth.rb', line 46 def callback_phase if [: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(.shib_session_id_field.to_s) || request_param(.shib_application_id_field.to_s)) super end |
#request_param(key) ⇒ Object
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/omniauth/strategies/shibboleth.rb', line 35 def request_param(key) case [:request_type] when :env request.env[key] when :header request.env["HTTP_#{key.upcase.gsub('-', '_')}"] when :params request.params[key] end end |
#request_params ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/omniauth/strategies/shibboleth.rb', line 26 def request_params case [:request_type] when :env, :header request.env when :params request.params end end |
#request_phase ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/omniauth/strategies/shibboleth.rb', line 15 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 |