Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hphy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
向怀芳
hphy
Commits
67e359fa
Commit
67e359fa
authored
Oct 21, 2022
by
向怀芳
🎱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 处理账号登录锁定异常
parent
72342a61
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
SictWebResponseExceptionTranslator.java
...ecurity/component/SictWebResponseExceptionTranslator.java
+5
-4
No files found.
cloud-common/cloud-common-security/src/main/java/cn/sh/stc/sict/cloud/common/security/component/SictWebResponseExceptionTranslator.java
View file @
67e359fa
...
@@ -35,13 +35,14 @@ public class SictWebResponseExceptionTranslator implements WebResponseExceptionT
...
@@ -35,13 +35,14 @@ public class SictWebResponseExceptionTranslator implements WebResponseExceptionT
// Try to extract a SpringSecurityException from the stacktrace
// Try to extract a SpringSecurityException from the stacktrace
Throwable
[]
causeChain
=
throwableAnalyzer
.
determineCauseChain
(
e
);
Throwable
[]
causeChain
=
throwableAnalyzer
.
determineCauseChain
(
e
);
Exception
ase
=
(
AccountLockedException
)
throwableAnalyzer
.
getFirstThrowableOfType
(
AccountLockedException
.
class
,
causeChain
);
if
(
ase
!=
null
){
return
handleOAuth2Exception
(
new
UnauthorizedException
(
e
.
getMessage
(),
e
,
HttpStatus
.
LOCKED
.
value
()));
}
Exception
ase
=
(
AuthenticationException
)
throwableAnalyzer
.
getFirstThrowableOfType
(
AuthenticationException
.
class
,
ase
=
(
AuthenticationException
)
throwableAnalyzer
.
getFirstThrowableOfType
(
AuthenticationException
.
class
,
causeChain
);
causeChain
);
if
(
ase
!=
null
)
{
if
(
ase
!=
null
)
{
if
(
ase
instanceof
AccountLockedException
){
return
handleOAuth2Exception
(
new
UnauthorizedException
(
e
.
getMessage
(),
e
,
HttpStatus
.
LOCKED
.
value
()));
}
return
handleOAuth2Exception
(
new
UnauthorizedException
(
e
.
getMessage
(),
e
));
return
handleOAuth2Exception
(
new
UnauthorizedException
(
e
.
getMessage
(),
e
));
}
}
...
...
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