Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
secure
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
胡懿
secure
Commits
1de40ae4
Commit
1de40ae4
authored
Sep 28, 2025
by
胡懿
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去除平台的验证,
parent
3fdf2083
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
5 deletions
+10
-5
TokenAuthenticationFilter.java
...ework/security/core/filter/TokenAuthenticationFilter.java
+4
-0
AuthController.java
...o/module/system/controller/admin/auth/AuthController.java
+2
-1
application-dev.yaml
yudao-server/src/main/resources/application-dev.yaml
+2
-2
application.yaml
yudao-server/src/main/resources/application.yaml
+2
-2
No files found.
yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/filter/TokenAuthenticationFilter.java
View file @
1de40ae4
...
...
@@ -54,6 +54,8 @@ public class TokenAuthenticationFilter extends OncePerRequestFilter {
protected
void
doFilterInternal
(
HttpServletRequest
request
,
HttpServletResponse
response
,
FilterChain
chain
)
throws
ServletException
,
IOException
{
MyReadApplicationUtils
.
readApplication
();
boolean
b
=
false
;
// 是否有别的平台的认证
if
(
b
)
{
String
pdToken
=
request
.
getHeader
(
"pdToken"
);
StringBuffer
requestURL
=
request
.
getRequestURL
();
stringRedisTemplate
.
opsForValue
().
set
(
"pdToken"
,
pdToken
);
...
...
@@ -98,6 +100,8 @@ public class TokenAuthenticationFilter extends OncePerRequestFilter {
}
// return;
}
}
String
token
=
SecurityFrameworkUtils
.
obtainAuthorization
(
request
,
securityProperties
.
getTokenHeader
(),
securityProperties
.
getTokenParameter
());
...
...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java
View file @
1de40ae4
...
...
@@ -82,7 +82,8 @@ public class AuthController {
@PermitAll
@Operation
(
summary
=
"验证平台token"
)
public
CommonResult
<
PtResult
<
LoginUserInfo
>>
checkPdToken
(
String
code
,
String
redirect_uri
)
{
if
(
null
!=
code
&&
!
""
.
equals
(
code
))
{
boolean
b
=
false
;
if
(
null
!=
code
&&
!
""
.
equals
(
code
)
&&
b
)
{
return
CommonResult
.
success
(
authService
.
checkPdToken
(
code
,
redirect_uri
));
}
...
...
yudao-server/src/main/resources/application-dev.yaml
View file @
1de40ae4
...
...
@@ -132,8 +132,8 @@ spring:
# virtual-host: /
# Kafka 配置项,对应 KafkaProperties 配置类
kafka
:
#
bootstrap-servers: 192.168.19.128:9092
bootstrap-servers
:
59.195.13.208:9092
bootstrap-servers
:
192.168.19.128:9092
#
bootstrap-servers: 59.195.13.208:9092
producer
:
retries
:
3
request.timeout.ms
:
60000
...
...
yudao-server/src/main/resources/application.yaml
View file @
1de40ae4
...
...
@@ -3,8 +3,8 @@ spring:
name
:
yudao-server
profiles
:
active
:
local
#
active: dev
#
active: local
active
:
dev
main
:
allow-circular-references
:
true
# 允许循环依赖,因为项目是三层架构,无法避免这个情况。
...
...
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