| xqd
@@ -72,7 +72,7 @@ class AuthController extends Controller
|
|
|
|
|
|
public function notifyAccount(Request $request)
|
|
|
{
|
|
|
- $postStr = $GLOBALS["HTTP_RAW_POST_DATA"];
|
|
|
+ /*$postStr = $GLOBALS["HTTP_RAW_POST_DATA"];
|
|
|
if (!empty($postStr)) {
|
|
|
$postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);
|
|
|
$fromUsername = $postObj->FromUserName;
|
| xqd
@@ -84,7 +84,7 @@ class AuthController extends Controller
|
|
|
} else {
|
|
|
echo "";
|
|
|
exit;
|
|
|
- }
|
|
|
+ }*/
|
|
|
$echoStr = $_GET["echostr"];
|
|
|
//如果有$echoStr说明是对接
|
|
|
if (!empty($echoStr)) {
|
| xqd
@@ -106,6 +106,24 @@ class AuthController extends Controller
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private function checkSignature()
|
|
|
+ {
|
|
|
+ $signature = $_GET["signature"];
|
|
|
+ $timestamp = $_GET["timestamp"];
|
|
|
+ $nonce = $_GET["nonce"];
|
|
|
+ $token = 'bshbdajdbjadwedwqer';
|
|
|
+ $tmpArr = array($token, $timestamp, $nonce);
|
|
|
+ sort($tmpArr);
|
|
|
+ $tmpStr = implode( $tmpArr );
|
|
|
+ $tmpStr = sha1( $tmpStr );
|
|
|
+
|
|
|
+ if( $tmpStr == $signature ){
|
|
|
+ return true;
|
|
|
+ }else{
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public function welcome()
|
|
|
{
|
|
|
return view('welcome');
|