/** * Authentication of a HTTP request. * * @param \Moip\Http\HTTPRequest $httpRequest */ public function authenticate(HTTPRequest $httpRequest) { $httpRequest->addRequestHeader('Authorization', 'Basic ' . base64_encode($this->token . ':' . $this->key)); }
/** * Authentication of a HTTP request. * * @param \Moip\Http\HTTPRequest $httpRequest */ public function authenticate(HTTPRequest $httpRequest) { $httpRequest->addRequestHeader('Authorization', 'OAuth ' . $this->accessToken); }