Esempio n. 1
0
 public function dispatch()
 {
     if (!$this->initialized) {
         throw new \Exception('ResponseBuilder not initialized. Call init() first');
     }
     $this->response->setResponseBody($this->sonicResponse->getJSONString());
     //echo "verifying response with key from GID ".Sonic::getContextGlobalID();
     $this->response->signResponse(Sonic::getContextAccountKeyPair()->getPrivateKey());
     $this->response->send();
 }
Esempio n. 2
0
 public function dispatch()
 {
     $this->request->signRequest(Sonic::getContextAccountKeyPair()->getPrivateKey());
     $this->response = new IncomingResponse($this->request->send(), $this->targetGID);
     return $this->response;
 }