Skip to content

Commit 92aff98

Browse files
author
yangshuai
committed
demo
1 parent d8116c2 commit 92aff98

File tree

4 files changed

+77
-12
lines changed

4 files changed

+77
-12
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
"codeages/biz-framework": "~0.1.2",
4444
"codeages/rest-api-client": "^0.1.3",
4545
"codeages/plugin-bundle": "^0.1.0",
46-
"codeages/biz-rate-limiter": "^0.1.1"
46+
"codeages/biz-rate-limiter": "^0.1.1",
47+
"xxtea/xxtea": "^1.0"
4748
},
4849
"require-dev": {
4950
"sensio/generator-bundle": "~3.0",

composer.lock

Lines changed: 61 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Topxia/MobileBundleV2/Processor/Impl/UserProcessorImpl.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,10 +663,23 @@ public function loginWithToken()
663663
return $result;
664664
}
665665

666+
private function decryptPassword($encryptPassword,$key)
667+
{
668+
require_once("xxtea.php");
669+
return xxtea_decrypt($encryptPassword, $key);
670+
}
666671
public function login()
667672
{
668673
$username = $this->getParam('_username');
669674
$password = $this->getParam('_password');
675+
//新的方式 加密过的密码通过password传递
676+
if (empty($password)) {
677+
$password = $this->getParam('password');
678+
$password = $this->decryptPassword($password,$this->request->getHost());
679+
}
680+
var_dump($this->request->getHost());
681+
var_dump($password);
682+
exit();
670683
$user = $this->loadUserByUsername($this->request, $username);
671684
if (empty($user)) {
672685
return $this->createErrorResponse('username_error', '用户帐号不存在');

vendor

Submodule vendor updated from 2ba8925 to 3ce5b08

0 commit comments

Comments
 (0)