Sha256: 1615736ace5d680f59340e3ef3ce0b19f577a815cf852f9c19cc26d3db52cab4

Contents?: true

Size: 514 Bytes

Versions: 15

Compression:

Stored size: 514 Bytes

Contents

require_relative 'listener'

class CASino::LoginCredentialRequestorListener < CASino::Listener
  def user_not_logged_in(login_ticket)
    assign(:login_ticket, login_ticket)
    @controller.cookies.delete :tgt
  end

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

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

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
casino-3.0.4 app/listeners/casino/login_credential_requestor_listener.rb
casino-2.0.7 app/listeners/casino/login_credential_requestor_listener.rb
casino-3.0.3 app/listeners/casino/login_credential_requestor_listener.rb
casino-3.0.2 app/listeners/casino/login_credential_requestor_listener.rb
casino-3.0.1 app/listeners/casino/login_credential_requestor_listener.rb
casino-3.0.0 app/listeners/casino/login_credential_requestor_listener.rb
casino-3.0.0.pre.2 app/listeners/casino/login_credential_requestor_listener.rb
casino-3.0.0.pre.1 app/listeners/casino/login_credential_requestor_listener.rb
casino-2.0.6 app/listeners/casino/login_credential_requestor_listener.rb
casino-2.0.5 app/listeners/casino/login_credential_requestor_listener.rb
casino-2.0.4 app/listeners/casino/login_credential_requestor_listener.rb
casino-2.0.3 app/listeners/casino/login_credential_requestor_listener.rb
casino-2.0.2 app/listeners/casino/login_credential_requestor_listener.rb
casino-2.0.1 app/listeners/casino/login_credential_requestor_listener.rb
casino-2.0.0 app/listeners/casino/login_credential_requestor_listener.rb