Class: OauthToken
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- OauthToken
show all
- Includes:
- Mongoid::Document, Mongoid::Timestamps
- Defined in:
- lib/generators/mongoid/oauth_provider_templates/oauth_token.rb,
lib/generators/active_record/oauth_provider_templates/oauth_token.rb
Instance Method Summary
(collapse)
Instance Method Details
- (Boolean) authorized?
31
32
33
|
# File 'lib/generators/mongoid/oauth_provider_templates/oauth_token.rb', line 31
def authorized?
authorized_at != nil && !invalidated?
end
|
- (Object) invalidate!
27
28
29
|
# File 'lib/generators/mongoid/oauth_provider_templates/oauth_token.rb', line 27
def invalidate!
update_attribute(:invalidated_at, Time.now)
end
|
- (Boolean) invalidated?
23
24
25
|
# File 'lib/generators/mongoid/oauth_provider_templates/oauth_token.rb', line 23
def invalidated?
invalidated_at != nil
end
|
- (Object) to_query
35
36
37
|
# File 'lib/generators/mongoid/oauth_provider_templates/oauth_token.rb', line 35
def to_query
"oauth_token=#{token}&oauth_token_secret=#{secret}"
end
|