Class: WardenOauthProvider::Token::Base

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/warden_oauth_provider/token/base.rb

Direct Known Subclasses

Access, Request

Instance Method Summary collapse

Instance Method Details

#authorized?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/warden_oauth_provider/token/base.rb', line 29

def authorized?
  authorized_at != nil && !invalidated?
end

#invalidate!Object



25
26
27
# File 'lib/warden_oauth_provider/token/base.rb', line 25

def invalidate!
  update_attribute(:invalidated_at, Time.now)
end

#invalidated?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/warden_oauth_provider/token/base.rb', line 21

def invalidated?
  invalidated_at != nil
end