|
@@ -4,11 +4,8 @@ import com.caimei365.user.model.ResponseJson;
|
|
import com.caimei365.user.model.vo.UserLoginVo;
|
|
import com.caimei365.user.model.vo.UserLoginVo;
|
|
import com.caimei365.user.service.LoginService;
|
|
import com.caimei365.user.service.LoginService;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
-import org.springframework.web.server.ServerWebExchange;
|
|
|
|
|
|
+import org.springframework.http.HttpHeaders;
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 登录API
|
|
* 登录API
|
|
@@ -45,8 +42,8 @@ public class LoginApi {
|
|
* @param iv 加密算法的初始向量
|
|
* @param iv 加密算法的初始向量
|
|
*/
|
|
*/
|
|
@PostMapping("/auth/applets")
|
|
@PostMapping("/auth/applets")
|
|
- public ResponseJson<UserLoginVo> appletsAuthorization(String code, String encryptedData, String iv, ServerWebExchange serverWebExchange) {
|
|
|
|
- return loginService.appletsAuthorization(code, encryptedData, iv, serverWebExchange);
|
|
|
|
|
|
+ public ResponseJson<UserLoginVo> appletsAuthorization(String code, String encryptedData, String iv, @RequestHeader HttpHeaders headers) {
|
|
|
|
+ return loginService.appletsAuthorization(code, encryptedData, iv, headers);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -72,8 +69,8 @@ public class LoginApi {
|
|
* @param mode 1:静默授权,2:用户手动授权
|
|
* @param mode 1:静默授权,2:用户手动授权
|
|
*/
|
|
*/
|
|
@GetMapping("/auth/website")
|
|
@GetMapping("/auth/website")
|
|
- public ResponseJson<UserLoginVo> websiteAuthorization(String code, String state, Integer mode, ServerWebExchange serverWebExchange) {
|
|
|
|
- return loginService.websiteAuthorization(code, state, mode, serverWebExchange);
|
|
|
|
|
|
+ public ResponseJson<UserLoginVo> websiteAuthorization(String code, String state, Integer mode, @RequestHeader HttpHeaders headers) {
|
|
|
|
+ return loginService.websiteAuthorization(code, state, mode, headers);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -85,8 +82,8 @@ public class LoginApi {
|
|
* @param state 安全认证
|
|
* @param state 安全认证
|
|
*/
|
|
*/
|
|
@GetMapping("/auth/qrCode")
|
|
@GetMapping("/auth/qrCode")
|
|
- public void qrCodeAuthorization(String code, String state, ServerWebExchange serverWebExchange) {
|
|
|
|
- loginService.qrCodeAuthorization(code, state, serverWebExchange);
|
|
|
|
|
|
+ public void qrCodeAuthorization(String code, String state) {
|
|
|
|
+ loginService.qrCodeAuthorization(code, state);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|