Class: Ofx::Authentication
- Inherits:
-
Object
- Object
- Ofx::Authentication
- Defined in:
- lib/ofx/authentication.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
Instance Method Summary collapse
- #auth_token_response ⇒ Object
- #get_access_token ⇒ Object
-
#initialize(client_id, client_secret) ⇒ Authentication
constructor
A new instance of Authentication.
Constructor Details
#initialize(client_id, client_secret) ⇒ Authentication
Returns a new instance of Authentication.
5 6 7 |
# File 'lib/ofx/authentication.rb', line 5 def initialize(client_id, client_secret) @client_id, @client_secret = client_id, client_secret end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
3 4 5 |
# File 'lib/ofx/authentication.rb', line 3 def access_token @access_token end |
Instance Method Details
#auth_token_response ⇒ Object
13 14 15 |
# File 'lib/ofx/authentication.rb', line 13 def auth_token_response @auth_token_response ||= JSON.parse(RestClient::Request.execute(auth_request)) end |
#get_access_token ⇒ Object
9 10 11 |
# File 'lib/ofx/authentication.rb', line 9 def get_access_token @access_token ||= auth_token_response["access_token"] end |