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.
Malio/app/Services/Jwt.php

29 lines
524 B
PHP

<?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());
}
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'));
}
}