Commit 1e30ab62 authored by 周健威's avatar 周健威

修改用户中心相关配置

parent 67335e2c
......@@ -49,6 +49,13 @@ public class AuthController {
@Autowired
private IUserService userService;
@Value("${universal.url}")
private String universalUrl;
@Value("${usercenter.urlapi}")
private String usercenterUrlapi;
@RequestMapping(value = "token", method = RequestMethod.POST)
public ObjectRestResponse<String> createAuthenticationToken(
@RequestBody JwtAuthenticationRequest authenticationRequest,
......@@ -70,7 +77,7 @@ public class AuthController {
@RequestMapping(value = "maxkeyLogin", method = RequestMethod.GET)
public ObjectRestResponse<String> maxkeyLogin(String callback, String apiKey, String apiSecret) throws Exception {
callback= StrUtil.isBlank(callback) ? "https://gdxm.upyuns.com/#/oauth20callback" : callback;
callback= StrUtil.isBlank(callback) ? universalUrl+ "/#/oauth20callback" : callback;
apiKey= StrUtil.isBlank(apiKey) ? "1024011282958778368" : apiKey;
apiSecret= StrUtil.isBlank(apiSecret) ? "JF17MjIwODIwMjQxNDU2MjA2OTkOJS" : apiSecret;
OAuthService service = new ServiceBuilder()
......@@ -86,7 +93,7 @@ public class AuthController {
@RequestMapping(value = "maxkeyLoginMgmt", method = RequestMethod.GET)
public ObjectRestResponse<String> maxkeyLoginMgmt() throws Exception {
String callback="https://gdxm.upyuns.com/mgmt/#/oauth20callback";
String callback=universalUrl+ "/mgmt/#/oauth20callback";
OAuthService service = new ServiceBuilder()
.provider(MaxkeyApi20.class)
.apiKey("1024312362988994560")
......@@ -115,11 +122,11 @@ public class AuthController {
String apiKey;
String apiSecret;
if (RequestTypeConstants.APP.equals(requestType)) {
callback="https://gdxm.upyuns.com/#/oauth20callback";
callback=universalUrl+ "/#/oauth20callback";
apiKey="1024011282958778368";
apiSecret="JF17MjIwODIwMjQxNDU2MjA2OTkOJS";
} else {
callback="https://gdxm.upyuns.com/mgmt/#/oauth20callback";
callback=universalUrl+ "/mgmt/#/oauth20callback";
apiKey="1024312362988994560";
apiSecret="PeVRMjMwODIwMjQxMDUyNDM3NzIwLg";
}
......@@ -135,7 +142,7 @@ public class AuthController {
Verifier verifier = new Verifier(request.getParameter("code"));
Token accessTokeToken = service.getAccessToken(EMPTY_TOKEN, verifier);
if(accessTokeToken.getAccess_token() != null) {
OAuthClient restClient=new OAuthClient("https://gdxm.upyuns.com/sign/api/oauth/v20/me");
OAuthClient restClient=new OAuthClient(usercenterUrlapi+ "api/oauth/v20/me");
UserInfo userInfo=restClient.getUserInfo(accessTokeToken.getAccess_token());
JwtAuthenticationRequest authenticationRequest = new JwtAuthenticationRequest(userInfo.getUsername(), null, JwtAuthenticationRequest.CHECKPASS_NO);
if (RequestTypeConstants.APP.equals(requestType)) {
......
......@@ -33,11 +33,4 @@ public class RscpImageDataNewestController extends BaseController<RscpImageDataN
return ObjectRestResponse.succ(pageDataVO);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment