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)


27
28
29
# File 'lib/warden_oauth_provider/token/base.rb', line 27

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

#invalidate!Object



23
24
25
# File 'lib/warden_oauth_provider/token/base.rb', line 23

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

#invalidated?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/warden_oauth_provider/token/base.rb', line 19

def invalidated?
  invalidated_at != nil
end