X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/e657cff464b6db8384b56236ad9491223a22b1e2..91b3d1a83feba263cb4fe529fb76737f259107ac:/app/models/oauth_nonce.rb diff --git a/app/models/oauth_nonce.rb b/app/models/oauth_nonce.rb index 075351b91..3ae50d3a4 100644 --- a/app/models/oauth_nonce.rb +++ b/app/models/oauth_nonce.rb @@ -3,7 +3,9 @@ class OauthNonce < ActiveRecord::Base validates_presence_of :nonce, :timestamp validates_uniqueness_of :nonce, :scope => :timestamp - + + attr_accessible :nonce, :timestamp + # Remembers a nonce and it's associated timestamp. It returns false if it has already been used def self.remember(nonce, timestamp) oauth_nonce = OauthNonce.create(:nonce => nonce, :timestamp => timestamp)