Ejemplo n.º 1
0
 /**
  * Test the checking works
  */
 public function testCheck()
 {
     $create = new Create($this->emailListId, $this->email);
     $this->assertTrue(Signer::check('147b861878241cd0040fa9297c3db54e03b93382:' . $this->timestamp, $this->authKey, $create->getRequestUrl(), $create->getRequestData()));
 }
Ejemplo n.º 2
0
 /**
  * Get the request headers
  *
  * @param CommandInterface $command
  * @return array
  */
 public function getHeaders(CommandInterface $command)
 {
     return ['x-authid' => $this->authId, 'x-authkey' => $this->authKey, 'signature' => Signer::sign($command, $this->authKey), 'content-type' => $command->getContentType()];
 }