From f87be5bfc6b3bcc5811926ae621433f7f74a9729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E5=86=B7?= Date: Sun, 9 Dec 2018 16:39:06 +0800 Subject: [PATCH] =?UTF-8?q?:arrow=5Fup:=20Upgrading=20dependencies.=20=20B?= =?UTF-8?q?OM=20SR6=20:bug:=20Fixing=20a=20bug.=20check=20token=20?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../handler/AbstractAuthenticationSuccessEventHandler.java | 5 ++++- .../pigx/admin/service/impl/SysSocialDetailsServiceImpl.java | 2 -- pom.xml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/handler/AbstractAuthenticationSuccessEventHandler.java b/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/handler/AbstractAuthenticationSuccessEventHandler.java index f14a06a2b..8a0293f90 100644 --- a/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/handler/AbstractAuthenticationSuccessEventHandler.java +++ b/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/handler/AbstractAuthenticationSuccessEventHandler.java @@ -17,6 +17,7 @@ package com.pig4cloud.pigx.common.security.handler; +import cn.hutool.core.collection.CollUtil; import org.springframework.context.ApplicationListener; import org.springframework.security.authentication.event.AuthenticationSuccessEvent; import org.springframework.security.core.Authentication; @@ -35,7 +36,9 @@ public abstract class AbstractAuthenticationSuccessEventHandler implements Appli @Override public void onApplicationEvent(AuthenticationSuccessEvent event) { Authentication authentication = (Authentication) event.getSource(); - handle(authentication); + if (CollUtil.isNotEmpty(authentication.getAuthorities())) { + handle(authentication); + } } /** diff --git a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysSocialDetailsServiceImpl.java b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysSocialDetailsServiceImpl.java index 2f58ae4df..1f17063eb 100755 --- a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysSocialDetailsServiceImpl.java +++ b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysSocialDetailsServiceImpl.java @@ -30,7 +30,6 @@ import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.cache.CacheManager; import org.springframework.stereotype.Service; -import org.springframework.web.client.RestTemplate; import java.util.Map; @@ -44,7 +43,6 @@ import java.util.Map; public class SysSocialDetailsServiceImpl extends ServiceImpl implements SysSocialDetailsService { private final Map loginHandlerMap; private final CacheManager cacheManager; - private final RestTemplate restTemplate; private final SysUserMapper sysUserMapper; /** diff --git a/pom.xml b/pom.xml index 69f152a57..2e779552b 100644 --- a/pom.xml +++ b/pom.xml @@ -44,7 +44,7 @@ 2.0.7.RELEASE Finchley.SR2 - Cairo-SR5 + Cairo-SR6 UTF-8 1.8 1.8