refactor: 优化微信小程序授权登录命名
This commit is contained in:
@@ -63,13 +63,13 @@ public class AuthController {
|
|||||||
return Result.success(authenticationToken);
|
return Result.success(authenticationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "微信授权登录")
|
@Operation(summary = "微信小程序授权登录")
|
||||||
@PostMapping("/login/wechat")
|
@PostMapping("/login/wechat-mini-program")
|
||||||
@Log(value = "微信登录", module = LogModuleEnum.LOGIN)
|
@Log(value = "微信登录", module = LogModuleEnum.LOGIN)
|
||||||
public Result<AuthenticationToken> loginByWechat(
|
public Result<AuthenticationToken> loginByWechatMiniProgram(
|
||||||
@Parameter(description = "微信授权码", example = "code") @RequestParam String code
|
@Parameter(description = "微信授权码", example = "code") @RequestParam String code
|
||||||
) {
|
) {
|
||||||
AuthenticationToken loginResult = authService.loginByWechat(code);
|
AuthenticationToken loginResult = authService.loginByWechatMiniProgram(code);
|
||||||
return Result.success(loginResult);
|
return Result.success(loginResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public interface AuthService {
|
|||||||
* @param code 微信登录code
|
* @param code 微信登录code
|
||||||
* @return 登录结果
|
* @return 登录结果
|
||||||
*/
|
*/
|
||||||
AuthenticationToken loginByWechat(String code);
|
AuthenticationToken loginByWechatMiniProgram(String code);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发送短信验证码
|
* 发送短信验证码
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ public class AuthServiceImpl implements AuthService {
|
|||||||
* @return 访问令牌
|
* @return 访问令牌
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AuthenticationToken loginByWechat(String code) {
|
public AuthenticationToken loginByWechatMiniProgram(String code) {
|
||||||
// 1. 创建用户微信认证的令牌(未认证)
|
// 1. 创建用户微信认证的令牌(未认证)
|
||||||
WechatAuthenticationToken wechatAuthenticationToken = new WechatAuthenticationToken(code);
|
WechatAuthenticationToken wechatAuthenticationToken = new WechatAuthenticationToken(code);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user