Class: Oauth2Rails::User
- Inherits:
-
Object
- Object
- Oauth2Rails::User
- Defined in:
- lib/oauth2_rails/user.rb
Instance Method Summary collapse
- #access_token ⇒ Object
- #expires_every ⇒ Object
- #id ⇒ Object
-
#initialize(auth) ⇒ User
constructor
A new instance of User.
- #json_response ⇒ Object
- #refresh_token ⇒ Object
Constructor Details
#initialize(auth) ⇒ User
Returns a new instance of User.
41 42 43 |
# File 'lib/oauth2_rails/user.rb', line 41 def initialize(auth) @token = auth end |
Instance Method Details
#access_token ⇒ Object
53 54 55 |
# File 'lib/oauth2_rails/user.rb', line 53 def access_token @token['access_token'] end |
#expires_every ⇒ Object
61 62 63 |
# File 'lib/oauth2_rails/user.rb', line 61 def expires_every @token['expires_in'] end |
#id ⇒ Object
49 50 51 |
# File 'lib/oauth2_rails/user.rb', line 49 def id @token['user_id'] end |
#json_response ⇒ Object
45 46 47 |
# File 'lib/oauth2_rails/user.rb', line 45 def json_response @token end |
#refresh_token ⇒ Object
57 58 59 |
# File 'lib/oauth2_rails/user.rb', line 57 def refresh_token @token['refresh_token'] end |