新增刷新token接口
This commit is contained in:
parent
ede7382256
commit
6b9dd4d80e
|
@ -8,10 +8,7 @@ import net.maku.framework.common.utils.Result;
|
|||
import net.maku.framework.security.utils.TokenUtils;
|
||||
import net.maku.system.service.SysAuthService;
|
||||
import net.maku.system.service.SysCaptchaService;
|
||||
import net.maku.system.vo.SysAccountLoginVO;
|
||||
import net.maku.system.vo.SysCaptchaVO;
|
||||
import net.maku.system.vo.SysMobileLoginVO;
|
||||
import net.maku.system.vo.SysTokenVO;
|
||||
import net.maku.system.vo.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
|
@ -46,8 +43,8 @@ public class SysAuthController {
|
|||
|
||||
@PostMapping("login")
|
||||
@Operation(summary = "账号密码登录")
|
||||
public Result<SysTokenVO> login(@RequestBody SysAccountLoginVO login) {
|
||||
SysTokenVO token = sysAuthService.loginByAccount(login);
|
||||
public Result<SysUserTokenVO> login(@RequestBody SysAccountLoginVO login) {
|
||||
SysUserTokenVO token = sysAuthService.loginByAccount(login);
|
||||
|
||||
return Result.ok(token);
|
||||
}
|
||||
|
@ -65,8 +62,16 @@ public class SysAuthController {
|
|||
|
||||
@PostMapping("mobile")
|
||||
@Operation(summary = "手机号登录")
|
||||
public Result<SysTokenVO> mobile(@RequestBody SysMobileLoginVO login) {
|
||||
SysTokenVO token = sysAuthService.loginByMobile(login);
|
||||
public Result<SysUserTokenVO> mobile(@RequestBody SysMobileLoginVO login) {
|
||||
SysUserTokenVO token = sysAuthService.loginByMobile(login);
|
||||
|
||||
return Result.ok(token);
|
||||
}
|
||||
|
||||
@PostMapping("token")
|
||||
@Operation(summary = "获取 accessToken")
|
||||
public Result<AccessTokenVO> token(String refreshToken) {
|
||||
AccessTokenVO token = sysAuthService.getAccessToken(refreshToken);
|
||||
|
||||
return Result.ok(token);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user