<?php

namespace App\Http\Controllers\API\H5;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use JWT;

class LoginController extends Controller
{
    public function Login()
    {
        $jwt= new JWT();
        $accessTimeout = $jwt -> GetGetSecretTimeOut();
        $refreshTimeout = $jwt -> GetRefreshTokenTimeOut();
        $access_token = $jwt->BuildJWT('yz','access','0006944759',666,$accessTimeout);
        $refresh_token = $jwt->BuildJWT('yz','refresh',9999,'',$refreshTimeout);
        $result['token']=$access_token;
        $result['refresh_token']=$refresh_token;
        return \Yz::Return(true,'登陆成功',$result);
    }
}
