Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
683a0e06
Commit
683a0e06
authored
Jun 28, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'base-modify' of
http://113.105.137.151:22280/youjj/cloud-platform
into base-modify
parents
f7b8b9cd
2cec9369
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
6 deletions
+16
-6
AuthController.java
...thub/wxiaoqi/security/auth/controller/AuthController.java
+7
-5
AppUserRest.java
...va/com/github/wxiaoqi/security/admin/rpc/AppUserRest.java
+1
-1
AppPermissionService.java
...aoqi/security/admin/rpc/service/AppPermissionService.java
+8
-0
No files found.
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/controller/AuthController.java
View file @
683a0e06
...
@@ -154,12 +154,14 @@ public class AuthController {
...
@@ -154,12 +154,14 @@ public class AuthController {
log
.
info
(
username
+
"----require reset..."
);
log
.
info
(
username
+
"----require reset..."
);
JSONObject
data
=
appAuthService
.
reset
(
username
,
mobilecode
,
password
);
JSONObject
data
=
appAuthService
.
reset
(
username
,
mobilecode
,
password
);
if
(
data
!=
null
&&
data
.
getInteger
(
"status"
)==
ResultCode
.
SUCCESS_CODE
){
if
(
data
!=
null
&&
data
.
getInteger
(
"status"
)==
ResultCode
.
SUCCESS_CODE
){
JwtAuthenticationRequest
authenticationRequest
=
new
JwtAuthenticationRequest
();
JSONObject
result
=
data
.
getJSONObject
(
"data"
);
authenticationRequest
.
setUsername
(
username
);
if
(
result
==
null
){
authenticationRequest
.
setPassword
(
password
);
data
.
put
(
"status"
,
1001
);
String
token
=
appAuthService
.
login
(
authenticationRequest
);
}
else
{
String
token
=
appAuthService
.
getToken
(
username
,
result
.
getInteger
(
"userId"
));
data
.
put
(
"token"
,
token
);
data
.
put
(
"token"
,
token
);
}
}
}
return
data
;
return
data
;
}
}
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rpc/AppUserRest.java
View file @
683a0e06
...
@@ -153,7 +153,7 @@ public class AppUserRest {
...
@@ -153,7 +153,7 @@ public class AppUserRest {
@RequestMapping
(
value
=
"/user/reset"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/user/reset"
,
method
=
RequestMethod
.
POST
)
public
@ResponseBody
public
@ResponseBody
JSONObject
login
(
JSONObject
reset
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
@RequestParam
(
value
=
"mobilecode"
,
defaultValue
=
""
)
String
mobilecode
,
@RequestParam
(
value
=
"mobilecode"
,
defaultValue
=
""
)
String
mobilecode
,
@RequestParam
(
value
=
"password"
,
defaultValue
=
""
)
String
password
@RequestParam
(
value
=
"password"
,
defaultValue
=
""
)
String
password
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rpc/service/AppPermissionService.java
View file @
683a0e06
...
@@ -532,6 +532,14 @@ public class AppPermissionService {
...
@@ -532,6 +532,14 @@ public class AppPermissionService {
Integer
userid
=
user
.
getId
();
Integer
userid
=
user
.
getId
();
String
nickname
=
SystemConfig
.
USER_NIKENAME_DEFAULT
+
(
int
)
((
Math
.
random
()
*
9
+
1
)
*
100000
);
String
nickname
=
SystemConfig
.
USER_NIKENAME_DEFAULT
+
(
int
)
((
Math
.
random
()
*
9
+
1
)
*
100000
);
JSONObject
data
=
autoLogin
(
userid
,
user
.
getUsername
(),
SystemConfig
.
USER_HEADER_URL_DEFAULT
,
nickname
);
JSONObject
data
=
autoLogin
(
userid
,
user
.
getUsername
(),
SystemConfig
.
USER_HEADER_URL_DEFAULT
,
nickname
);
// 到im注册,获取返回结果
Integer
imUserId
=
user
.
getImUserid
();
String
imPassword
=
user
.
getImPassword
();
if
(
StringUtils
.
isNotBlank
(
imPassword
)&&
imUserId
!=
null
&&
imUserId
>
0
){
String
access_token
=
loginIm
(
username
,
imPassword
,
imUserId
);
data
.
put
(
"imToken"
,
access_token
);
data
.
put
(
"imUserId"
,
imUserId
);
}
if
(
data
!=
null
)
{
if
(
data
!=
null
)
{
return
JsonResultUtil
.
createSuccessResultWithObj
(
data
);
return
JsonResultUtil
.
createSuccessResultWithObj
(
data
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment