protected function addIdentityHeader(RequestInterface $request) { if (null === $this->publicKey) { throw new \Exception('Please set your Public Key.'); } $request->setHeader('x-identity', (string) $this->publicKey); }