Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
D
data-server
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
licc
data-server
Commits
6eaf4672
Commit
6eaf4672
authored
Mar 12, 2021
by
m1991
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资讯模块数据——数据展示功能修复
parent
aa5211fb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
JwtFilter.java
...rc/main/java/cn/wisenergy/web/shiro/filter/JwtFilter.java
+4
-8
No files found.
wisenergy-web-admin/src/main/java/cn/wisenergy/web/shiro/filter/JwtFilter.java
View file @
6eaf4672
...
...
@@ -12,6 +12,7 @@ import org.apache.shiro.authz.UnauthorizedException;
import
org.apache.shiro.web.filter.authc.BasicHttpAuthenticationFilter
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
javax.servlet.ServletRequest
;
import
javax.servlet.ServletResponse
;
...
...
@@ -59,16 +60,11 @@ public class JwtFilter extends BasicHttpAuthenticationFilter {
*/
@Override
protected
boolean
isAccessAllowed
(
ServletRequest
request
,
ServletResponse
response
,
Object
mappedValue
)
{
if
(
isLoginAttempt
(
request
,
response
))
{
//if (!isLoginAttempt(request, response) || !executeLogin(request,response)) {
try
{
executeLogin
(
request
,
response
);
}
catch
(
UnauthorizedException
|
AuthenticationException
e
)
{
return
false
;
}
}
if
(((
HttpServletRequest
)
request
).
getMethod
().
equals
(
RequestMethod
.
OPTIONS
.
name
()))
{
return
true
;
}
return
false
;
}
/**
* 判断用户是否想要登入。
...
...
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