Commit c7362ee2 authored by hujun's avatar hujun

token接收修改

parent 23d685d9
...@@ -76,7 +76,7 @@ class Basic extends Controller ...@@ -76,7 +76,7 @@ class Basic extends Controller
$jwt = new \Firebase\JWT\JWT(); $jwt = new \Firebase\JWT\JWT();
try { try {
$result = $jwt->decode($this->authToken, config('jwt_key'), array( 'HS256' )); //解码token $result = $jwt->decode($this->params['AuthToken'], config('jwt_key'), array( 'HS256' )); //解码token
} catch( UnexpectedValueException $e) { } catch( UnexpectedValueException $e) {
echo json_encode(array( "code" => "300", "msg" => "AuthToken parameter error!", "data" => [], "type" => "json" )); echo json_encode(array( "code" => "300", "msg" => "AuthToken parameter error!", "data" => [], "type" => "json" ));
exit; exit;
......
...@@ -73,7 +73,7 @@ class Basic extends Controller ...@@ -73,7 +73,7 @@ class Basic extends Controller
$jwt = new \Firebase\JWT\JWT(); $jwt = new \Firebase\JWT\JWT();
try { try {
$result = $jwt->decode($this->authToken, config('jwt_key'), array( 'HS256' )); //解码token $result = $jwt->decode($this->params['AuthToken'], config('jwt_key'), array( 'HS256' )); //解码token
} catch( UnexpectedValueException $e) { } catch( UnexpectedValueException $e) {
echo json_encode(array( "code" => "300", "msg" => "AuthToken参数错误!", "data" => [], "type" => "json" )); echo json_encode(array( "code" => "300", "msg" => "AuthToken参数错误!", "data" => [], "type" => "json" ));
exit; exit;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment