Class: RestClientWrapper::Authenticator::Token
- Inherits:
-
Object
- Object
- RestClientWrapper::Authenticator::Token
- Includes:
- RestClientWrapper::Auth
- Defined in:
- lib/rest_client_wrapper/authenticators/token.rb
Overview
Token
Instance Method Summary collapse
- #generate_auth ⇒ Object
-
#initialize(access_token:) ⇒ Token
constructor
A new instance of Token.
Constructor Details
#initialize(access_token:) ⇒ Token
Returns a new instance of Token.
31 32 33 |
# File 'lib/rest_client_wrapper/authenticators/token.rb', line 31 def initialize(access_token:) @access_token = access_token end |
Instance Method Details
#generate_auth ⇒ Object
35 36 37 |
# File 'lib/rest_client_wrapper/authenticators/token.rb', line 35 def generate_auth return { Authorization: "Bearer #{ @access_token }" } end |