/** * @param \Jose\SignerInterface $signer * @param \Jose\EncrypterInterface|null $encrypter * * @return \Jose\JWTCreator */ public function createJWTCreator(SignerInterface $signer, EncrypterInterface $encrypter = null) { $jwt_creator = new JWTCreator($signer); if (null !== $encrypter) { $jwt_creator->enableEncryptionSupport($encrypter); } return $jwt_creator; }