Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
auth-server-parent
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5d6e8c05
authored
Aug 28, 2023
by
zhouhaibao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]去掉时间戳校验
1 parent
7516440e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
platform-auth/src/main/java/cn/com/glsx/auth/modules/controller/AuthController.java
platform-auth/src/main/java/cn/com/glsx/auth/modules/controller/AuthController.java
View file @
5d6e8c0
...
@@ -73,9 +73,9 @@ public class AuthController {
...
@@ -73,9 +73,9 @@ public class AuthController {
}
}
//验证时间戳
//验证时间戳
long
diff
=
System
.
currentTimeMillis
()
-
request
.
getTimestamp
().
getTime
();
long
diff
=
System
.
currentTimeMillis
()
-
request
.
getTimestamp
().
getTime
();
if
(
diff
<
0
||
diff
>
5
*
60
*
1000L
)
{
//
if (diff < 0 || diff > 5 * 60 * 1000L) {
throw
ResultException
.
create
(
"请求参数timestamp不在系统允许的范围内"
);
//
throw ResultException.create("请求参数timestamp不在系统允许的范围内");
}
//
}
//验证secret
//验证secret
if
(
"SM3"
.
equals
(
request
.
getGrantType
()))
{
if
(
"SM3"
.
equals
(
request
.
getGrantType
()))
{
if
(!
SM3Utils
.
verify
(
gatewayService
.
getSecret
(),
request
.
getAppSecret
(),
gatewayService
.
getAppKey
()))
{
if
(!
SM3Utils
.
verify
(
gatewayService
.
getSecret
(),
request
.
getAppSecret
(),
gatewayService
.
getAppKey
()))
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment