Module: Devise::Oauth2Providable::ExpirableToken::LocalInstanceMethods
- Defined in:
- lib/devise/oauth2_providable/expirable_token.rb
Instance Method Summary collapse
-
#expired! ⇒ Object
forcefully expire the token.
-
#expires_in ⇒ Object
number of seconds until the token expires.
Instance Method Details
#expired! ⇒ Object
forcefully expire the token
40 41 42 43 |
# File 'lib/devise/oauth2_providable/expirable_token.rb', line 40 def expired! self.expires_at = Time.now.utc self.save! end |
#expires_in ⇒ Object
number of seconds until the token expires
35 36 37 |
# File 'lib/devise/oauth2_providable/expirable_token.rb', line 35 def expires_in (expires_at - Time.now.utc).to_i end |