public function setupSigner(ServerIssuedCredentials $serverIssuedCredentials = null)
    {
        if ($this->shouldSignWithClientCredentials()) {
            $this->signer->setClientCredentials($this->config->getClientCredentials());
        }

        if ($this->shouldSignWithServerIssuedCredentials($serverIssuedCredentials)) {
            $this->signer->setServerIssuedCredentials($serverIssuedCredentials);
        }

        return $this->signer;
    }