Skip to content

Commit 64c1101

Browse files
author
suyaqi
committed
fix: 修复 单词拼写错误导致的鉴权失败
1 parent 7122470 commit 64c1101

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

application/api/controller/Oauth.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static function getClient()
4848
{
4949
//获取头部信息
5050
try {
51-
$authorization = Request::header('authentication'); //获取请求中的authentication字段,值形式为USERID asdsajh..这种形式
51+
$authorization = Request::header('authorization'); //获取请求中的authorization字段,值形式为USERID asdsajh..这种形式
5252
$authorization = explode(" ", $authorization); //explode分割,获取后面一窜base64加密数据
5353
$authorizationInfo = explode(":", base64_decode($authorization[1])); //对base_64解密,获取到用:拼接的自字符串,然后分割,可获取appid、accesstoken、uid这三个参数
5454
$clientInfo['uid'] = $authorizationInfo[2];
@@ -122,4 +122,4 @@ private static function _getOrderMd5($params = [] , $app_secret = '') {
122122
return strtolower(md5(urldecode(http_build_query($params))));
123123
}
124124

125-
}
125+
}

0 commit comments

Comments
 (0)