|
@@ -48,8 +48,8 @@ public class MdeAuthController {
|
|
|
return success(authService.login(reqVO));
|
|
|
}
|
|
|
|
|
|
- @PostMapping("/logout")
|
|
|
@PermitAll
|
|
|
+ @PostMapping("/logout")
|
|
|
@Operation(summary = "登出系统")
|
|
|
public CommonResult<Boolean> logout(HttpServletRequest request) {
|
|
|
String token = SecurityFrameworkUtils.obtainAuthorization(request,
|
|
@@ -60,6 +60,7 @@ public class MdeAuthController {
|
|
|
return success(true);
|
|
|
}
|
|
|
|
|
|
+ @PermitAll
|
|
|
@PostMapping("/refresh-token")
|
|
|
@Operation(summary = "刷新令牌")
|
|
|
@Parameter(name = "refreshToken", description = "刷新令牌", required = true)
|
|
@@ -69,12 +70,14 @@ public class MdeAuthController {
|
|
|
|
|
|
// ========== 短信登录相关 ==========
|
|
|
|
|
|
+ @PermitAll
|
|
|
@PostMapping("/sms-login")
|
|
|
@Operation(summary = "使用手机 + 验证码登录")
|
|
|
public CommonResult<MdeAuthLoginRespVO> smsLogin(@RequestBody @Valid MdeAuthSmsLoginReqVO reqVO) {
|
|
|
return success(authService.smsLogin(reqVO));
|
|
|
}
|
|
|
|
|
|
+ @PermitAll
|
|
|
@PostMapping("/send-sms-code")
|
|
|
@Operation(summary = "发送手机验证码")
|
|
|
public CommonResult<Boolean> sendSmsCode(@RequestBody @Valid MdeAuthSmsSendReqVO reqVO) {
|
|
@@ -82,6 +85,7 @@ public class MdeAuthController {
|
|
|
return success(true);
|
|
|
}
|
|
|
|
|
|
+ @PermitAll
|
|
|
@PostMapping("/validate-sms-code")
|
|
|
@Operation(summary = "校验手机验证码")
|
|
|
public CommonResult<Boolean> validateSmsCode(@RequestBody @Valid MdeAuthSmsValidateReqVO reqVO) {
|
|
@@ -91,6 +95,7 @@ public class MdeAuthController {
|
|
|
|
|
|
// ========== 社交登录相关 ==========
|
|
|
|
|
|
+ @PermitAll
|
|
|
@GetMapping("/social-auth-redirect")
|
|
|
@Operation(summary = "社交授权的跳转")
|
|
|
@Parameters({
|
|
@@ -102,18 +107,21 @@ public class MdeAuthController {
|
|
|
return CommonResult.success(authService.getSocialAuthorizeUrl(type, redirectUri));
|
|
|
}
|
|
|
|
|
|
+ @PermitAll
|
|
|
@PostMapping("/social-login")
|
|
|
@Operation(summary = "社交快捷登录,使用 code 授权码", description = "适合未登录的用户,但是社交账号已绑定用户")
|
|
|
public CommonResult<MdeAuthLoginRespVO> socialLogin(@RequestBody @Valid MdeAuthSocialLoginReqVO reqVO) {
|
|
|
return success(authService.socialLogin(reqVO));
|
|
|
}
|
|
|
|
|
|
+ @PermitAll
|
|
|
@PostMapping("/weixin-mini-app-login")
|
|
|
@Operation(summary = "微信小程序的一键登录")
|
|
|
public CommonResult<MdeAuthLoginRespVO> weixinMiniAppLogin(@RequestBody @Valid MdeAuthWeixinMiniAppLoginReqVO reqVO) {
|
|
|
return success(authService.weixinMiniAppLogin(reqVO));
|
|
|
}
|
|
|
|
|
|
+ @PermitAll
|
|
|
@PostMapping("/create-weixin-jsapi-signature")
|
|
|
@Operation(summary = "创建微信 JS SDK 初始化所需的签名",
|
|
|
description = "参考 https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html 文档")
|