Module: Authpds::Session::ExceptionHandling

Included in:
Authpds::Session
Defined in:
lib/authpds/session/exception_handling.rb

Instance Method Summary collapse

Instance Method Details

#alert_the_authorities(error) ⇒ Object



17
18
19
# File 'lib/authpds/session/exception_handling.rb', line 17

def alert_the_authorities(error)
  controller.logger.error("Error in #{self.class}. Something is amiss with PDS authentication.\n#{error}\n#{error.backtrace.inspect}}")
end

#handle_login_exception(error) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/authpds/session/exception_handling.rb', line 4

def (error)
  # Set a cookie saying that we've got some invalid stuff going on
  # in this session.  Either PDS is screwy, OpenSSO is screwy, or both.
  # Either way, we want to skip logging in since it's problematic (if anonymous).
  controller.cookies["#{calling_system}_inaccessible".to_sym] = {
    :value => session_id,
    :path => "/" } if anonymous?
  # If anonymous access isn't allowed, we can't rightfully set the cookie.
  # We probably should send to a system down page.
  controller.redirect_to()
  alert_the_authorities error
end