更新中台接口
This commit is contained in:
parent
637ada6ffa
commit
814e198af2
@ -72,13 +72,13 @@ class SignMiddleware extends BaseMiddleware
|
|||||||
{
|
{
|
||||||
// 验证请求, 10秒钟失效
|
// 验证请求, 10秒钟失效
|
||||||
if (time() - ($data['timestamp'] ?? 0) > 10) {
|
if (time() - ($data['timestamp'] ?? 0) > 10) {
|
||||||
// throw new AuthException('签名已失效');
|
throw new AuthException('签名已失效');
|
||||||
}
|
}
|
||||||
// 比对签名
|
// 比对签名
|
||||||
$clientSign = $data['sign'] ?? '';
|
$clientSign = $data['sign'] ?? '';
|
||||||
$serverSign = $this->makeSign($data, $appSecret);
|
$serverSign = $this->makeSign($data, $appSecret);
|
||||||
if ($clientSign != $serverSign) {
|
if ($clientSign != $serverSign) {
|
||||||
// throw new AuthException('签名校验失败');
|
throw new AuthException('签名校验失败');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -5,6 +5,7 @@ use crmeb\basic\BaseController;
|
|||||||
use think\App;
|
use think\App;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
use app\common\repositories\system\merchant\MerchantRepository;
|
use app\common\repositories\system\merchant\MerchantRepository;
|
||||||
|
use Overtrue\Pinyin\Pinyin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Auth
|
* Class Auth
|
||||||
|
Loading…
x
Reference in New Issue
Block a user