Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
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
fangxinjiang
yifu-mvp
Commits
df924c09
Commit
df924c09
authored
Jan 13, 2025
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
鉴权-fxj
parent
8204ccf6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
YifuWxLoginSuccessHandler.java
.../plus/v1/yifu/auth/handler/YifuWxLoginSuccessHandler.java
+5
-1
No files found.
yifu-auth/src/main/java/com/yifu/cloud/plus/v1/yifu/auth/handler/YifuWxLoginSuccessHandler.java
View file @
df924c09
...
...
@@ -33,6 +33,8 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Map
;
/**
...
...
@@ -75,7 +77,9 @@ public class YifuWxLoginSuccessHandler implements AuthenticationSuccessHandler {
throw new InvalidClientException("请求头中client信息验证异常");
}*/
//TokenRequest tokenRequest = new TokenRequest(MapUtil.newHashMap(), clientId, clientDetails.getScope(), "password");
TokenRequest
tokenRequest
=
new
TokenRequest
(
MapUtil
.
newHashMap
(),
null
,
null
,
"password"
);
Collection
<
String
>
scope
=
new
ArrayList
<>();
scope
.
add
(
"server"
);
TokenRequest
tokenRequest
=
new
TokenRequest
(
MapUtil
.
newHashMap
(),
"auth"
,
scope
,
"password"
);
//校验scope
ClientDetails
clientDetails
=
clientDetailsService
.
loadClientByClientId
(
null
);
new
DefaultOAuth2RequestValidator
().
validateScope
(
tokenRequest
,
clientDetails
);
...
...
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