|
|
@@ -100,11 +100,6 @@ public class CpsBackLoginController {
|
|
|
*/
|
|
|
@GetMapping("/wx/authLogin")
|
|
|
public Result<CpsAuthDto> wxAuthorize(String redirectUrl) throws Exception {
|
|
|
- Object authUrlObj = redisService.get(RedisService.key.WX_LOGIN_AUTH_URI.getNameFormat("cps", wxOpenPlatYHLXLoginConfig.getAppId()));
|
|
|
- if (authUrlObj != null) {
|
|
|
- CpsAuthDto cpsAuthDto = Jsons.parseObject(authUrlObj.toString(), CpsAuthDto.class);
|
|
|
- return GatewayResponse.SUCCESS.newBuilder().toResult(cpsAuthDto);
|
|
|
- }
|
|
|
CpsAuthDto cpsAuthDto = new CpsAuthDto();
|
|
|
Long mappingId = SEQUENCE.nextId();
|
|
|
String authState = mappingId.toString();
|
|
|
@@ -115,7 +110,6 @@ public class CpsBackLoginController {
|
|
|
String wxAuthUrl = authorizationService.createWxAuthLoginUrl(state, wxOpenPlatYHLXLoginConfig.getAppId(), wxOpenPlatYHLXLoginConfig.getCpsRedirectUri());
|
|
|
cpsAuthDto.setAuthUrl(wxAuthUrl);
|
|
|
cpsAuthDto.setAuthState(authState);
|
|
|
- redisService.set(RedisService.key.WX_LOGIN_AUTH_URI.getNameFormat("cps", wxOpenPlatYHLXLoginConfig.getAppId()), Jsons.toJson(cpsAuthDto), RedisService.key.WX_LOGIN_AUTH_URI.getTimeout());
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(cpsAuthDto);
|
|
|
}
|
|
|
|