zouxuan 5 年之前
父节点
当前提交
9f17bd9516

+ 2 - 1
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/core/handler/BaseAuthenticationSuccessEventHandler.java

@@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.commons.collections.MapUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -111,7 +112,7 @@ public class BaseAuthenticationSuccessEventHandler extends SavedRequestAwareAuth
 			OAuth2AccessToken oAuth2AccessToken = defaultAuthorizationServerTokenServices.createAccessToken(oAuth2Authentication);
 			logger.info("获取token 成功:{}", oAuth2AccessToken.getValue());
 			Map<String,Object> map = new HashMap<>(3);
-			map.put("password",sysUser.getPassword());
+			map.put("password", StringUtils.isEmpty(sysUser.getPassword())?false:true);
 			map.put("authentication",oAuth2AccessToken);
 			response.setContentType("application/json; charset=utf-8");
 			HttpResponseResult result = new HttpResponseResult(true, HttpStatus.OK.value(), map, "");