1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-24 12:05:39 +08:00
course-tencent-cloud/app/Validators/WeChatOfficialAccount.php
xiaochong0302 a31c991b1c 1.优化ShareUrl
2.第三方登录增加账号可用性判断
3.优化公众号关注相关
2024-05-12 19:17:57 +08:00

30 lines
665 B
PHP

<?php
/**
* @copyright Copyright (c) 2021 深圳市酷瓜软件有限公司
* @license https://opensource.org/licenses/GPL-2.0
* @link https://www.koogua.com
*/
namespace App\Validators;
use App\Exceptions\BadRequest as BadRequestException;
use App\Services\Logic\WeChat\OfficialAccount as WeChatOfficeAccount;
class WeChatOfficialAccount extends Validator
{
public function checkLoginOpenId($ticket)
{
$service = new WeChatOfficeAccount();
$openId = $service->getLoginOpenId($ticket);
if (!$openId) {
throw new BadRequestException('wechat_oa.invalid_login_ticket');
}
return $openId;
}
}