]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
Switch web site to use OAuth 2
[rails.git] / app / controllers / application_controller.rb
index fc8b75b60144ec40e2bf2a851ae7fcdce8c171da..8df126a04e3a5ea02325b652dc0f0432cf08b5ab 100644 (file)
@@ -67,7 +67,7 @@ class ApplicationController < ActionController::Base
   end
 
   def require_oauth
-    @oauth_token = current_user.access_token(Settings.oauth_key) if current_user && Settings.key?(:oauth_key)
+    @oauth_token = current_user.oauth_token(Settings.oauth_application) if current_user && Settings.key?(:oauth_application)
   end
 
   ##