public static function generate(RequestInterface $request, string $issuer, string $secret): string
    {
        $data = [
            'iss' => $issuer,
            'iat' => \time(),
            'exp' => \strtotime('+1 day'),
            'qsh' => QSHGenerator::generate((string) $request->getUri(), $request->getMethod()),
        ];

        return JWT::encode($data, $secret);
    }