fix: 通过key调用系统后清理session

This commit is contained in:
CaptainB 2022-06-25 22:01:02 +08:00 committed by f2c-ci-robot[bot]
parent 0c9f45bb00
commit c6cb4025c6
1 changed files with 7 additions and 0 deletions

View File

@ -49,4 +49,11 @@ public class ApiKeyFilter extends AnonymousFilter {
return true; return true;
} }
@Override
protected void postHandle(ServletRequest request, ServletResponse response) throws Exception {
if (SecurityUtils.getSubject().isAuthenticated()) {
SecurityUtils.getSubject().logout();
}
}
} }