Class: CASino::SecondFactorAuthenticationAcceptorListener
- Inherits:
-
Listener
- Object
- Listener
- CASino::SecondFactorAuthenticationAcceptorListener
show all
- Defined in:
- app/listeners/casino/second_factor_authentication_acceptor_listener.rb
Instance Method Summary
collapse
Methods inherited from Listener
#initialize
Instance Method Details
#invalid_one_time_password ⇒ Object
18
19
20
|
# File 'app/listeners/casino/second_factor_authentication_acceptor_listener.rb', line 18
def invalid_one_time_password
@controller.flash.now[:error] = I18n.t('validate_otp.invalid_otp')
end
|
#service_not_allowed(service) ⇒ Object
22
23
24
25
|
# File 'app/listeners/casino/second_factor_authentication_acceptor_listener.rb', line 22
def service_not_allowed(service)
assign(:service, service)
@controller.render 'service_not_allowed', status: 403
end
|
#user_logged_in(url, ticket_granting_ticket, cookie_expiry_time = nil) ⇒ Object
9
10
11
12
13
14
15
16
|
# File 'app/listeners/casino/second_factor_authentication_acceptor_listener.rb', line 9
def user_logged_in(url, ticket_granting_ticket, cookie_expiry_time = nil)
@controller.cookies[:tgt] = { value: ticket_granting_ticket, expires: cookie_expiry_time }
if url.nil?
@controller.redirect_to sessions_path, status: :see_other
else
@controller.redirect_to url, status: :see_other
end
end
|
#user_not_logged_in ⇒ Object
5
6
7
|
# File 'app/listeners/casino/second_factor_authentication_acceptor_listener.rb', line 5
def user_not_logged_in
@controller.redirect_to login_path
end
|