API接口-authtoken、redis
This commit is contained in:
@@ -165,6 +165,18 @@ if (!function_exists('get_auth_token')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('get_agent_jwt_payload')) {
|
||||
/**
|
||||
* 解析 Agent JWT authtoken,返回 payload(agent_id、channel_id、admin_id 等)
|
||||
* @param string $token authtoken
|
||||
* @return array 成功返回 payload,失败返回空数组
|
||||
*/
|
||||
function get_agent_jwt_payload(string $token): array
|
||||
{
|
||||
return \app\common\library\AgentJwt::decode($token);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('get_controller_path')) {
|
||||
/**
|
||||
* 从 Request 或路由获取控制器路径(等价于 ThinkPHP controllerPath)
|
||||
|
||||
Reference in New Issue
Block a user