Class: Asana::Authentication::TokenAuthentication
- Inherits:
-
Object
- Object
- Asana::Authentication::TokenAuthentication
- Defined in:
- lib/asana/authentication/token_authentication.rb
Overview
Represents an API token authentication mechanism.
Instance Method Summary collapse
-
#configure(connection) ⇒ void
Configures a Faraday connection injecting its token as basic auth.
-
#initialize(token) ⇒ TokenAuthentication
constructor
A new instance of TokenAuthentication.
Constructor Details
#initialize(token) ⇒ TokenAuthentication
Returns a new instance of TokenAuthentication.
5 6 7 |
# File 'lib/asana/authentication/token_authentication.rb', line 5 def initialize(token) @token = token end |
Instance Method Details
#configure(connection) ⇒ void
This method returns an undefined value.
Configures a Faraday connection injecting its token as basic auth.
15 16 17 |
# File 'lib/asana/authentication/token_authentication.rb', line 15 def configure(connection) connection.basic_auth(@token, '') end |