<?php


namespace App\Services\api;


use App\Authority;
use App\Owner;
use App\User;
use Firebase\JWT\JWT;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Gate;
use App\Traits\ServiceAppAop;


class UserService
{
    public function getUser($jwt)
    {
        $alg =
            [
                "typ" => "JWT", //声明类型为jwt
                "alg" => "HS256" //声明签名算法为SHA256
            ];
//        $key = env('JWT_SECRET');
        $key =  config('weiXin.jwt.JWT_SECRET');
        return JWT::decode($jwt,$key,$alg);
    }
}
