Class: Casablanca::Rails::GatewayFilter
- Defined in:
- lib/casablanca/rails/filter.rb
Class Method Summary collapse
-
.get_credentials(controller) ⇒ Object
# Has the user already talked to the Cas server? def authentication_required?(controller) super(controller) end.
- .redirect_to_cas_login(controller) ⇒ Object
Methods inherited from Filter
authenticate_ticket, authentication_required?, filter, logger, login_url, logout, logout_url
Class Method Details
.get_credentials(controller) ⇒ Object
# Has the user already talked to the Cas server? def authentication_required?(controller)
super(controller)
end
125 126 127 128 129 130 131 |
# File 'lib/casablanca/rails/filter.rb', line 125 def get_credentials(controller) if controller.session[:cas_gatewayed] logger.debug "Allow user without credentials because gateway is set" return true end return super(controller) end |
.redirect_to_cas_login(controller) ⇒ Object
133 134 135 136 137 |
# File 'lib/casablanca/rails/filter.rb', line 133 def redirect_to_cas_login(controller) controller.session[:cas_gatewayed] = true logger.debug "Redirecting to #{login_url(controller, :gateway => true)}" controller.send(:redirect_to, login_url(controller, :gateway => true)) end |