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