]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/request_token.rb
Localisation updates from https://translatewiki.net.
[rails.git] / app / models / request_token.rb
index 335a735bc5a4dbcab80c07d92f2791df53447509..f7c9501b56b3c84ce938a98b4966c4c3d8ac11d3 100644 (file)
@@ -40,6 +40,7 @@ class RequestToken < OauthToken
 
   def authorize!(user)
     return false if authorized?
+
     self.user = user
     self.authorized_at = Time.now
     self.verifier = OAuth::Helper.generate_key(20)[0, 20] unless oauth10?
@@ -76,6 +77,6 @@ class RequestToken < OauthToken
   end
 
   def oauth10?
-    (defined? OAUTH_10_SUPPORT) && OAUTH_10_SUPPORT && callback_url.blank?
+    Settings.key?(:oauth_10_support) && Settings.oauth_10_support && callback_url.blank?
   end
 end