Class: Rhoconnect::Base
- Inherits:
-
Controller::AppBase
- Object
- Sinatra::Base
- Server
- Controller::Base
- Controller::AppBase
- Rhoconnect::Base
- Defined in:
- lib/rhoconnect/controller/app_base.rb
Overview
aliasing Rhoconnect::Base class name to provide backward compatibility TODO: deprecate this class along with application.rb support and remove in 4.1
Constant Summary
Constants included from Rhoconnect
API_TOKEN_HEADER, API_VERSION, APP_NAME, CLIENT_ID_HEADER, CURRENT_APP, CURRENT_CLIENT, CURRENT_REQUEST, CURRENT_SOURCE, CURRENT_USER, PAGE_OBJECT_COUNT_HEADER, PAGE_TOKEN_HEADER, QUERY_RES, SYNC_VERSION, SourceAdapter, SourceAdapterException, SourceAdapterLoginException, SourceAdapterLogoffException, SourceAdapterObjectConflictErrorException, SourceAdapterServerErrorException, SourceAdapterServerTimeoutException, UNKNOWN_CLIENT, UNKNOWN_SOURCE, VERSION
Class Method Summary collapse
Methods inherited from Controller::AppBase
Methods inherited from Controller::Base
_prefix, _rest_name, delete, get, post, put, rest_path
Methods inherited from Server
Methods included from Condition::AdminRequired
extended, #include_admin_required_condition
Methods included from Condition::LoginRequired
extended, #include_login_required_condition
Methods included from Condition::SourceRequired
extended, #include_source_required_condition
Methods included from Condition::ClientRequired
extended, #include_client_required_condition
Methods included from Condition::Verbs
extended, #include_verbs_condition
Methods included from Condition::VerifySuccess
extended, #include_verify_success_condition
Methods included from Condition::AddParameter
extended, #include_add_parameter_condition
Methods included from Handler::Authenticate::ExecuteMethods
#execute_admin_authenticate_handler, #execute_authenticate_handler, #execute_rps_authenticate_handler
Methods included from Handler::PluginCallbacks::ExecuteMethods
#do_fast_delete, #do_fast_insert, #do_fast_update, #execute_push_objects_handler
Methods included from Handler::Search::ExecuteMethods
Methods included from Handler::Changes::ExecuteMethods
#_extract_cud_params, #_run_cud_handler, #execute_create_handler, #execute_cud_handler, #execute_delete_handler, #execute_update_handler
Methods included from Handler::Query::ExecuteMethods
Methods included from Rhoconnect
#add_to_url_map, #app, #bootstrap, #camelize, #check_and_add, #check_default_secret!, #check_for_schema_field!, #create_admin_user, #create_predefined_source, #environment, #expire_bulk_data, #get_config, #get_random_identifier, #get_token, #getelement, #lap_timer, #log, #register_predefined_source, #remove_from_url_map, #setelement, settings, shutdown, #source_config, #start_app, #start_nodejs_channels, #start_timer, #timenow, #under_score, #unzip_file, #url_map, #which
Class Method Details
.initializer(path = nil) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/rhoconnect/controller/app_base.rb', line 36 def self.initializer(path=nil) require 'rhoconnect/application/init' # post deprecation warning !!! warning_for_deprecated_application = <<_MIGRATE_TO_NEW_RHOCONNECT ***** WARNING ***** RhoConnect has detected that you're using deprecated Application class. Application class support will be removed in RhoConnect 4.1. Please, migrate your Application class into ApplicationController. For more details, see RhoConnect Migration guidelines at docs.rhomobile.com _MIGRATE_TO_NEW_RHOCONNECT puts warning_for_deprecated_application # !!! Add routes here - because otherwise they will be added in all apps # even those that has new style Application class self.register Rhoconnect::EndPoint # Application login post "/login", { :rc_handler => :authenticate, :deprecated_route => {:verb => :post, :url => ['/application/clientlogin', '/api/application/clientlogin']}, :client_required => false } do Application.authenticate(params[:login], params[:password], session) end # Push service login get "/rps_login", :rc_handler => :rps_authenticate, :client_required => false do if Application.singleton_methods.map(&:to_sym).include?(:rps_authenticate) Application.rps_authenticate(params[:login], params[:password]) else false end end end |