diff --git a/pigx-auth/src/main/resources/templates/ftl/login.ftl b/pigx-auth/src/main/resources/templates/ftl/login.ftl index 24ec34d4f..0b95aac81 100755 --- a/pigx-auth/src/main/resources/templates/ftl/login.ftl +++ b/pigx-auth/src/main/resources/templates/ftl/login.ftl @@ -17,7 +17,7 @@
- + <#if tenantList??> + diff --git a/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/listener/AuthenticationLogoutSuccessEventListener.java b/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/listener/AuthenticationLogoutSuccessEventListener.java index 327ad62f6..ab43753d5 100644 --- a/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/listener/AuthenticationLogoutSuccessEventListener.java +++ b/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/listener/AuthenticationLogoutSuccessEventListener.java @@ -46,6 +46,11 @@ public class AuthenticationLogoutSuccessEventListener implements ApplicationList */ @Override public void onApplicationEvent(LogoutSuccessEvent event) { + // 健壮性判断 + if (!(event.getSource() instanceof OAuth2Authentication)) { + return; + } + OAuth2Authentication authentication = (OAuth2Authentication) event.getSource(); if (logoutHandler != null && isUserAuthentication(authentication)) { ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder