protected function createSignatureToken($origin, \DateTime $expiration = null)
    {
        if (is_null($expiration)) {
            $expiration = new \DateTime('+ 1 hours');
        }

        $signer = new ES256();
        $privateKey = new Key('file://'.$this->getParameter('privateKey'));

        $builder = new Builder();
        $token = $builder
            ->setAudience($origin)
            ->setExpiration($expiration->getTimestamp())
            ->sign($signer, $privateKey)
            ->getToken();

        return $token;
    }