Class: RestClientWrapper::Authenticator::Token

Inherits:
Object
  • Object
show all
Includes:
RestClientWrapper::Auth
Defined in:
lib/rest_client_wrapper/authenticators/token.rb

Overview

Token

Instance Method Summary collapse

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_authObject



35
36
37
# File 'lib/rest_client_wrapper/authenticators/token.rb', line 35

def generate_auth
  return { Authorization: "Bearer #{ @access_token }" }
end