|
@@ -124,16 +124,33 @@ public class AuthController extends ControllerSupport {
|
|
|
|
|
|
@Naked
|
|
@Naked
|
|
@WithoutStackTrace(true)
|
|
@WithoutStackTrace(true)
|
|
- @ApiOperation(value = "第三方机构接入", notes = "")
|
|
|
|
|
|
+ @ApiOperation(value = "第三方普通用户接入", notes = "")
|
|
@PostMapping("/thirdPartyAccess")
|
|
@PostMapping("/thirdPartyAccess")
|
|
- public User thirdPartyAccess(HttpServletRequest request, @RequestParam Long orgId,
|
|
|
|
|
|
+ public User thirdPartyCommonUserAccess(HttpServletRequest request, @RequestParam Long orgId,
|
|
@RequestParam String loginName, @RequestParam String appId,
|
|
@RequestParam String loginName, @RequestParam String appId,
|
|
@RequestParam String timestamp, @RequestParam String token) {
|
|
@RequestParam String timestamp, @RequestParam String token) {
|
|
String realIp = request.getHeader("x-forwarded-for");
|
|
String realIp = request.getHeader("x-forwarded-for");
|
|
if (StringUtils.isBlank(realIp)) {
|
|
if (StringUtils.isBlank(realIp)) {
|
|
realIp = request.getHeader("x-real-ip");
|
|
realIp = request.getHeader("x-real-ip");
|
|
}
|
|
}
|
|
- return authService.thirdPartyCommonUserAccess(orgId, loginName, appId, timestamp, token, realIp);
|
|
|
|
|
|
+ return authService.thirdPartyCommonUserAccess(orgId, loginName, appId, timestamp, token,
|
|
|
|
+ realIp);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Naked
|
|
|
|
+ @WithoutStackTrace(true)
|
|
|
|
+ @ApiOperation(value = "第三方学生接入", notes = "")
|
|
|
|
+ @PostMapping("/thirdPartyStudentAccess")
|
|
|
|
+ public User thirdPartyStudentAccess(HttpServletRequest request, @RequestParam Long rootOrgId,
|
|
|
|
+ @RequestParam String accountType, @RequestParam String accountValue,
|
|
|
|
+ @RequestParam String appId, @RequestParam String timestamp,
|
|
|
|
+ @RequestParam String token) {
|
|
|
|
+ String realIp = request.getHeader("x-forwarded-for");
|
|
|
|
+ if (StringUtils.isBlank(realIp)) {
|
|
|
|
+ realIp = request.getHeader("x-real-ip");
|
|
|
|
+ }
|
|
|
|
+ return authService.thirdPartyStudentAccess(rootOrgId, accountType, accountValue, appId,
|
|
|
|
+ timestamp, token, realIp);
|
|
}
|
|
}
|
|
|
|
|
|
@Naked
|
|
@Naked
|