data_center/app/common/validate/login/TokenValidate.php

30 lines
583 B
PHP

<?php
namespace app\common\validate\login;
use app\common\validate\BaseValidate;
class TokenValidate extends BaseValidate
{
protected $rule = [
'token' => 'require',
'uid' => 'require',
];
protected $message = [
'token.require' => '缺少必要参数token',
'uid.require' => '缺少必要参数uid',
];
//UserToken验证
public function sceneUserToken()
{
return $this->only(['uid', 'token']);
}
//JwtToken验证
public function sceneJwtToken()
{
return $this->only(['token']);
}
}