Class: CASino::LoginCredentialRequestorListener

Inherits:
Listener
  • Object
show all
Defined in:
app/listeners/casino/login_credential_requestor_listener.rb

Instance Method Summary collapse

Methods inherited from Listener

#initialize

Constructor Details

This class inherits a constructor from CASino::Listener

Instance Method Details

#service_not_allowed(service) ⇒ Object



9
10
11
12
# File 'app/listeners/casino/login_credential_requestor_listener.rb', line 9

def service_not_allowed(service)
  assign(:service, service)
  @controller.render 'service_not_allowed', status: 403
end

#user_logged_in(url) ⇒ Object



14
15
16
17
18
19
20
# File 'app/listeners/casino/login_credential_requestor_listener.rb', line 14

def user_logged_in(url)
  if url.nil?
    @controller.redirect_to sessions_path
  else
    @controller.redirect_to url, status: :see_other
  end
end

#user_not_logged_in(login_ticket) ⇒ Object



4
5
6
7
# File 'app/listeners/casino/login_credential_requestor_listener.rb', line 4

def user_not_logged_in()
  assign(:login_ticket, )
  @controller.cookies.delete :tgt
end