Esempio n. 1
0
 /**
  * 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));
 }
Esempio n. 2
0
 /**
  * Authentication of a HTTP request.
  *
  * @param \Moip\Http\HTTPRequest $httpRequest
  */
 public function authenticate(HTTPRequest $httpRequest)
 {
     $httpRequest->addRequestHeader('Authorization', 'OAuth ' . $this->accessToken);
 }