Module: Orkut::Authenticatable
- Included in:
- API
- Defined in:
- lib/orkut/authenticatable.rb
Instance Method Summary collapse
-
#authenticated? ⇒ Boolean
Check whether user is authenticated.
- #authenticated_v1? ⇒ Boolean
- #credentials ⇒ Object
-
#credentials_v1 ⇒ Hash
Credentials hash.
Instance Method Details
#authenticated? ⇒ Boolean
Check whether user is authenticated
28 29 30 |
# File 'lib/orkut/authenticatable.rb', line 28 def authenticated? credentials.values.all? end |
#authenticated_v1? ⇒ Boolean
32 33 34 |
# File 'lib/orkut/authenticatable.rb', line 32 def authenticated_v1? credentials_v1.values.all? end |
#credentials ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/orkut/authenticatable.rb', line 16 def credentials { :refresh_token => refresh_token, :access_token => access_token, :expires_in => expires_in, :issued_at => issued_at } end |
#credentials_v1 ⇒ Hash
Credentials hash
7 8 9 10 11 12 13 14 |
# File 'lib/orkut/authenticatable.rb', line 7 def credentials_v1 { :consumer_key => consumer_key, :consumer_secret => consumer_secret, :token => oauth_token, :token_secret => oauth_token_secret } end |