protected static function authorization()
{
$token = new Emarref\Jwt\Token();
$parameter = new Emarref\Jwt\HeaderParameter\Custom('typ', 'JWT');
$token->addHeader($parameter, true);
$token->addClaim(new Emarref\Jwt\Claim\Expiration(new \DateTime(self::$duration)));
$jwt = new Emarref\Jwt\Jwt();
$algorithm = new Emarref\Jwt\Algorithm\Hs256(self::$appSecret);
$encryption = Emarref\Jwt\Encryption\Factory::create($algorithm);
$serializedToken = $jwt->serialize($token, $encryption);
return $serializedToken;
}