Class: WardenOauthProvider::Nonce
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- WardenOauthProvider::Nonce
- Defined in:
- lib/warden_oauth_provider/nonce.rb
Class Method Summary collapse
-
.remember(nonce, timestamp) ⇒ Object
Remembers a nonce and it’s associated timestamp.
Class Method Details
.remember(nonce, timestamp) ⇒ Object
Remembers a nonce and it’s associated timestamp. It returns false if it has already been used
11 12 13 14 15 |
# File 'lib/warden_oauth_provider/nonce.rb', line 11 def self.remember(nonce, ) Nonce.create!(:nonce => nonce.to_s, :timestamp => ) rescue ActiveRecord::RecordInvalid false end |