You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
GeekQu_sspanel/app/Services/Jwt.php

29 lines
524 B
PHTML

9 years ago
<?php
namespace App\Services;
use Firebase\JWT\JWT as JwtClient;
class Jwt
{
private static function getKey()
{
return Config::get('key');
}
public static function encode($input)
{
return JwtClient::encode($input, self::getKey());
}
8 years ago
9 years ago
public static function encode_withkey($input, $key)
{
return JwtClient::encode($input, $key);
}
public static function decodeArray($input)
{
return JWT::decode($input, self::getKey(), array('HS256'));
9 years ago
}
}