class OmniAuth::Strategies::ShibbolethPassive

Public Instance Methods

callback_phase() click to toggle source

Override callback phase to not fail where there isn't a Shibboleth session

Calls superclass method
# File lib/omniauth/strategies/shibboleth_passive.rb, line 10
def callback_phase
  if shibboleth_session? || shibboleth_idp_called?
    unset_shibboleth_idp_called_param
    (shibboleth_session?) ? super : silent_fail
  else
    set_shibboleth_idp_called_param
    redirect(shibboleth_idp_url)
  end
end
set_shibboleth_idp_called_param() click to toggle source
# File lib/omniauth/strategies/shibboleth_passive.rb, line 37
def set_shibboleth_idp_called_param
  session[:shibboleth_idp_called] = true
end
shibboleth_idp_called?() click to toggle source
# File lib/omniauth/strategies/shibboleth_passive.rb, line 33
def shibboleth_idp_called?
  shibboleth_idp_called_param == true
end
shibboleth_idp_called_param() click to toggle source
# File lib/omniauth/strategies/shibboleth_passive.rb, line 45
def shibboleth_idp_called_param
  session[:shibboleth_idp_called]
end
shibboleth_idp_url() click to toggle source
# File lib/omniauth/strategies/shibboleth_passive.rb, line 24
def shibboleth_idp_url
  "/Shibboleth.sso/Login?isPassive=true&target=#{URI.escape(callback_url)}"
end
shibboleth_session?() click to toggle source
# File lib/omniauth/strategies/shibboleth_passive.rb, line 28
def shibboleth_session?
  (request_param(options.shib_session_id_field.to_s) || 
    request_param(options.shib_application_id_field.to_s))
end
silent_fail() click to toggle source
# File lib/omniauth/strategies/shibboleth_passive.rb, line 20
def silent_fail
  OmniAuth.config.on_failure.call(env)
end
unset_shibboleth_idp_called_param() click to toggle source
# File lib/omniauth/strategies/shibboleth_passive.rb, line 41
def unset_shibboleth_idp_called_param
  session[:shibboleth_idp_called] = nil
end