]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/oauth_nonce.rb
Check the oauth token and then use the capabilities directly
[rails.git] / app / models / oauth_nonce.rb
index 0952f068edc6b9a9d2525206e1fd5069c8ff7516..9d2773e8f346c5b8e6789c8a314020c7a39edd41 100644 (file)
@@ -22,8 +22,10 @@ class OauthNonce < ActiveRecord::Base
   # Remembers a nonce and it's associated timestamp. It returns false if it has already been used
   def self.remember(nonce, timestamp)
     return false if Time.now.to_i - timestamp.to_i > 86400
+
     oauth_nonce = OauthNonce.create(:nonce => nonce, :timestamp => timestamp.to_i)
     return false if oauth_nonce.new_record?
+
     oauth_nonce
   end
 end