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