diff options
-rw-r--r-- | Gemfile | 4 | ||||
-rw-r--r-- | Gemfile.lock | 8 | ||||
-rw-r--r-- | app/controllers/api_controller.rb | 12 |
3 files changed, 12 insertions, 12 deletions
@@ -15,9 +15,7 @@ gem "rails_warden" gem 'http_accept_language' # To use debugger -gem 'debugger', :platforms => :mri_19 -# ruby 1.8 is not supported anymore -# gem 'ruby-debug', :platforms => :mri_18 +# gem 'debugger', :platforms => :mri_19 gem "haml", "~> 3.1.7" gem "bootstrap-sass", "= 2.3.2.2" diff --git a/Gemfile.lock b/Gemfile.lock index c14847f..7b6d11a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -74,7 +74,6 @@ GEM coffee-script-source execjs coffee-script-source (1.6.3) - columnize (0.8.9) couchrest (1.1.3) mime-types (~> 1.15) multi_json (~> 1.0) @@ -101,12 +100,6 @@ GEM nokogiri (~> 1.5) rails (>= 3, < 5) daemons (1.1.9) - debugger (1.6.8) - columnize (>= 0.3.1) - debugger-linecache (~> 1.2.0) - debugger-ruby_core_source (~> 1.3.5) - debugger-linecache (1.2.0) - debugger-ruby_core_source (1.3.5) diff-lcs (1.2.5) erubis (2.7.0) eventmachine (1.0.3) @@ -266,7 +259,6 @@ DEPENDENCIES couchrest_model (~> 2.0.0) couchrest_session_store (~> 0.2.4) cucumber-rails - debugger factory_girl_rails fake_braintree faker diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index 70b3cac..d5bec70 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -5,8 +5,18 @@ class ApiController < ApplicationController protected + # + # For now, we are going to allow cookie authentication if there is + # no "Authorization" header in the request. This is to keep backward + # compatibility with older clients. In the future, this should be + # disabled. + # def require_login - require_token + if ActionController::HttpAuthentication::Token.token_and_options(request) + require_token + else + super + end end def anonymous_access_allowed? |