Sha256: b31e3eb99191130b0936ad8fec6da5bbd958c708140132d8ab3c25a5d7dcb63b

Contents?: true

Size: 851 Bytes

Versions: 23

Compression:

Stored size: 851 Bytes

Contents

class ApplicationController < Rhoconnect::Controller::AppBase
  register Rhoconnect::EndPoint

  post '/login', :rc_handler => :authenticate,
                 :deprecated_route => {:verb => :post, :url => ['/application/clientlogin', '/api/application/clientlogin']}  do
    username = params[:login]
    password = params[:password] 
    session[:auth] = "delegated"
    raise RuntimeError.new('server error') if password == 'server error'
    raise LoginException.new('login exception') if password == 'wrongpass'
    return "different" if password == "diffuser"
    password == 'wrongpassnomsg' ? false : true  
  end

  get '/rps_login', :rc_handler => :rps_authenticate, 
                    :login_required => true do
    username = params[:login]
    password = params[:password]
    'rpsuser:secret' == [username,password].join(':') 
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rhoconnect-7.6.0 spec/apps/rhotestapp/controllers/ruby/application_controller.rb
rhoconnect-7.5.1 spec/apps/rhotestapp/controllers/ruby/application_controller.rb
rhoconnect-7.4.1 spec/apps/rhotestapp/controllers/ruby/application_controller.rb
rhoconnect-7.1.17 spec/apps/rhotestapp/controllers/ruby/application_controller.rb
rhoconnect-6.2.0 spec/apps/rhotestapp/controllers/ruby/application_controller.rb
rhoconnect-6.0.11 spec/apps/rhotestapp/controllers/ruby/application_controller.rb
rhoconnect-5.5.18 spec/apps/rhotestapp/controllers/ruby/application_controller.rb
rhoconnect-5.5.17 spec/apps/rhotestapp/controllers/ruby/application_controller.rb
rhoconnect-5.5.15 spec/apps/rhotestapp/controllers/ruby/application_controller.rb
rhoconnect-5.5.0.22 spec/apps/rhotestapp/controllers/ruby/application_controller.rb
rhoconnect-5.5.2 spec/apps/rhotestapp/controllers/ruby/application_controller.rb
rhoconnect-5.5.0.7 spec/apps/rhotestapp/controllers/ruby/application_controller.rb
rhoconnect-5.5.0.3 spec/apps/rhotestapp/controllers/ruby/application_controller.rb
rhoconnect-5.5.0 spec/apps/rhotestapp/controllers/ruby/application_controller.rb
rhoconnect-5.1.1 spec/apps/rhotestapp/controllers/ruby/application_controller.rb
rhoconnect-4.0.4 spec/apps/rhotestapp/controllers/ruby/application_controller.rb
rhoconnect-4.0.3 spec/apps/rhotestapp/controllers/ruby/application_controller.rb
rhoconnect-4.0.2 spec/apps/rhotestapp/controllers/ruby/application_controller.rb
rhoconnect-4.0.1 spec/apps/rhotestapp/controllers/ruby/application_controller.rb
rhoconnect-4.0.0 spec/apps/rhotestapp/controllers/ruby/application_controller.rb