Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
bb5cc6f6
Commit
bb5cc6f6
authored
Oct 27, 2019
by
dqjdda
Browse files
代码优化
parent
7fe31802
Changes
1
Hide whitespace changes
Inline
Side-by-side
eladmin-system/src/main/java/me/zhengjie/modules/security/rest/AuthenticationController.java
View file @
bb5cc6f6
...
...
@@ -18,6 +18,7 @@ import me.zhengjie.modules.security.utils.JwtTokenUtil;
import
me.zhengjie.utils.SecurityUtils
;
import
me.zhengjie.utils.StringUtils
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.security.authentication.AccountExpiredException
;
...
...
@@ -37,6 +38,9 @@ import javax.servlet.http.HttpServletRequest;
@Api
(
tags
=
"系统:系统授权接口"
)
public
class
AuthenticationController
{
@Value
(
"${jwt.online}"
)
private
String
onlineKey
;
private
final
JwtTokenUtil
jwtTokenUtil
;
private
final
RedisService
redisService
;
...
...
@@ -100,7 +104,7 @@ public class AuthenticationController {
captcha
.
setLen
(
2
);
// 获取运算的结果:5
String
result
=
captcha
.
text
();
String
uuid
=
IdUtil
.
simpleUUID
();
String
uuid
=
onlineKey
+
IdUtil
.
simpleUUID
();
redisService
.
saveCode
(
uuid
,
result
);
return
new
ImgResult
(
captcha
.
toBase64
(),
uuid
);
}
...
...
Write
Preview
Supports
Markdown
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