Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xzxt-app-report
Overview
Overview
Details
Activity
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
Administrator
xzxt-app-report
Commits
b6e13fe2
Commit
b6e13fe2
authored
Nov 30, 2021
by
wang_jiaxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改登陆校验的密码加密方式
parent
403c54bd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
src/main/java/org/springblade/modules/auth/granter/PasswordTokenGranter.java
+4
-1
No files found.
src/main/java/org/springblade/modules/auth/granter/PasswordTokenGranter.java
View file @
b6e13fe2
...
@@ -21,6 +21,7 @@ import org.springblade.core.tool.utils.Func;
...
@@ -21,6 +21,7 @@ import org.springblade.core.tool.utils.Func;
import
org.springblade.modules.system.entity.UserInfoResult
;
import
org.springblade.modules.system.entity.UserInfoResult
;
import
org.springblade.modules.system.service.IUserService
;
import
org.springblade.modules.system.service.IUserService
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
sun.misc.BASE64Encoder
;
/**
/**
* PasswordTokenGranter
* PasswordTokenGranter
...
@@ -44,8 +45,10 @@ public class PasswordTokenGranter implements ITokenGranter {
...
@@ -44,8 +45,10 @@ public class PasswordTokenGranter implements ITokenGranter {
if
(
Func
.
isNoneBlank
(
account
,
password
))
{
if
(
Func
.
isNoneBlank
(
account
,
password
))
{
// 获取用户类型
// 获取用户类型
String
userType
=
tokenParameter
.
getArgs
().
getStr
(
"userType"
);
String
userType
=
tokenParameter
.
getArgs
().
getStr
(
"userType"
);
BASE64Encoder
encoder
=
new
BASE64Encoder
();
// 根据不同用户类型调用对应的接口返回数据,用户可自行拓展
// 根据不同用户类型调用对应的接口返回数据,用户可自行拓展
userInfo
=
userService
.
userInfoR
(
tenantId
,
account
,
DigestUtil
.
encrypt
(
password
));
userInfo
=
userService
.
userInfoR
(
tenantId
,
account
,
encoder
.
encode
(
password
.
getBytes
()));
// userInfo = userService.userInfoR(tenantId, account, DigestUtil.encrypt(password));
// if (userType.equals(BladeUserEnum.WEB.getName())) {
// if (userType.equals(BladeUserEnum.WEB.getName())) {
// userInfo = userService.userInfo(tenantId, account, DigestUtil.encrypt(password));
// userInfo = userService.userInfo(tenantId, account, DigestUtil.encrypt(password));
// } else if (userType.equals(BladeUserEnum.APP.getName())) {
// } else if (userType.equals(BladeUserEnum.APP.getName())) {
...
...
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