Class: ChatWork::OAuthClient

Inherits:
BaseClient show all
Defined in:
lib/chatwork/oauth_client.rb

Instance Method Summary collapse

Methods inherited from BaseClient

#handle_response

Constructor Details

#initialize(client_id, client_secret, oauth_api_base) ⇒ OAuthClient

Returns a new instance of OAuthClient.


5
6
7
8
# File 'lib/chatwork/oauth_client.rb', line 5

def initialize(client_id, client_secret, oauth_api_base)
  signature = Base64.encode64("#{client_id}:#{client_secret}").delete("\n")
  super(oauth_api_base, "", { "Authorization" => "Basic #{signature}" })
end