Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-backend
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
framework
cloud-backend
Commits
f4e18205
Commit
f4e18205
authored
Sep 06, 2021
by
袁伟铭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.0.0
parent
4b7da5ae
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
6 deletions
+12
-6
api-server/pom.xml
+1
-1
file-server/pom.xml
+1
-1
sys-server/pom.xml
+1
-1
sys-server/src/main/java/com/zq/system/config/security/TokenFilter.java
+4
-1
user-server/pom.xml
+1
-1
user-server/src/main/java/com/zq/user/config/TokenFilter.java
+4
-1
No files found.
api-server/pom.xml
View file @
f4e18205
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
com.zq
</groupId>
<groupId>
com.zq
</groupId>
<artifactId>
common-utils
</artifactId>
<artifactId>
xxx-
common-utils
</artifactId>
<version>
1.0.0
</version>
<version>
1.0.0
</version>
</dependency>
</dependency>
...
...
file-server/pom.xml
View file @
f4e18205
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
com.zq
</groupId>
<groupId>
com.zq
</groupId>
<artifactId>
common-utils
</artifactId>
<artifactId>
xxx-
common-utils
</artifactId>
<version>
1.0.0
</version>
<version>
1.0.0
</version>
</dependency>
</dependency>
<dependency>
<dependency>
...
...
sys-server/pom.xml
View file @
f4e18205
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
com.zq
</groupId>
<groupId>
com.zq
</groupId>
<artifactId>
common-utils
</artifactId>
<artifactId>
xxx-
common-utils
</artifactId>
<version>
1.0.0
</version>
<version>
1.0.0
</version>
</dependency>
</dependency>
<dependency>
<dependency>
...
...
sys-server/src/main/java/com/zq/system/config/security/TokenFilter.java
View file @
f4e18205
...
@@ -98,7 +98,10 @@ public class TokenFilter extends GenericFilterBean {
...
@@ -98,7 +98,10 @@ public class TokenFilter extends GenericFilterBean {
*/
*/
private
String
resolveToken
(
HttpServletRequest
request
)
{
private
String
resolveToken
(
HttpServletRequest
request
)
{
String
bearerToken
=
request
.
getHeader
(
properties
.
getHeader
());
String
bearerToken
=
request
.
getHeader
(
properties
.
getHeader
());
if
(
StringUtils
.
hasText
(
bearerToken
)
&&
bearerToken
.
startsWith
(
properties
.
getTokenStartWith
()))
{
if
(
StringUtils
.
hasText
(
bearerToken
))
{
return
null
;
}
if
(
bearerToken
.
startsWith
(
properties
.
getTokenStartWith
()))
{
// 去掉令牌前缀
// 去掉令牌前缀
return
bearerToken
.
replace
(
properties
.
getTokenStartWith
(),
""
);
return
bearerToken
.
replace
(
properties
.
getTokenStartWith
(),
""
);
}
else
{
}
else
{
...
...
user-server/pom.xml
View file @
f4e18205
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<parent>
<artifactId>
cloud-backend
</artifactId>
<groupId>
com.zq
</groupId>
<groupId>
com.zq
</groupId>
<artifactId>
cloud-backend
</artifactId>
<version>
1.0.0
</version>
<version>
1.0.0
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
...
...
user-server/src/main/java/com/zq/user/config/TokenFilter.java
View file @
f4e18205
...
@@ -98,7 +98,10 @@ public class TokenFilter extends GenericFilterBean {
...
@@ -98,7 +98,10 @@ public class TokenFilter extends GenericFilterBean {
*/
*/
private
String
resolveToken
(
HttpServletRequest
request
)
{
private
String
resolveToken
(
HttpServletRequest
request
)
{
String
bearerToken
=
request
.
getHeader
(
properties
.
getHeader
());
String
bearerToken
=
request
.
getHeader
(
properties
.
getHeader
());
if
(
StringUtils
.
hasText
(
bearerToken
)
&&
bearerToken
.
startsWith
(
properties
.
getTokenStartWith
()))
{
if
(
StringUtils
.
hasText
(
bearerToken
))
{
return
null
;
}
if
(
bearerToken
.
startsWith
(
properties
.
getTokenStartWith
()))
{
// 去掉令牌前缀
// 去掉令牌前缀
return
bearerToken
.
replace
(
properties
.
getTokenStartWith
(),
""
);
return
bearerToken
.
replace
(
properties
.
getTokenStartWith
(),
""
);
}
else
{
}
else
{
...
...
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