|
|
@ -74,11 +74,14 @@ public class InternalAuthProcessor extends AuthProcessor { |
|
|
|
app = (String) claims.get(AppClientConstant.APP); |
|
|
|
client = (String) claims.get(AppClientConstant.CLIENT); |
|
|
|
userId = (String) claims.get(AppClientConstant.USER_ID); |
|
|
|
customerId = (String) claims.get(AppClientConstant.CUSTOMER_ID); |
|
|
|
expiration = claims.getExpiration(); |
|
|
|
baseTokenDto = cpUserDetailRedis.get(app, client, userId, BaseTokenDto.class); |
|
|
|
//市北数字社区 如果redis里不存在 则自动登陆 生成token放入redis
|
|
|
|
if (baseTokenDto == null){ |
|
|
|
Result<String> stringResult = epmetAuthOpenFeignClient.generateTokenBySSOKey("123", userId, CustomerIdConstant.SHI_BEI_CUSTOMER_ID); |
|
|
|
//目前只支持市北客户ID 这样免登陆
|
|
|
|
if (CustomerIdConstant.SHI_BEI_CUSTOMER_ID.equals(customerId)){ |
|
|
|
Result<String> stringResult = epmetAuthOpenFeignClient.generateTokenBySSOKey("123", userId, customerId); |
|
|
|
if (stringResult != null && stringResult.success() && StringUtils.isNotBlank(stringResult.getData())){ |
|
|
|
baseTokenDto = new BaseTokenDto(); |
|
|
|
baseTokenDto.setApp(app); |
|
|
@ -94,6 +97,7 @@ public class InternalAuthProcessor extends AuthProcessor { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (baseTokenDto != null) { |
|
|
|
customerId = baseTokenDto.getCustomerId(); |
|
|
|