@Service public class LoginServiceImpl extends Object implements LoginService
登录服务实现类
| Constructor and Description |
|---|
LoginServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkVerifyCode(String verifyToken,
String code)
检查验证码是否正确
|
SysUser |
getSysUserByUsername(String username)
根据用户名获取系统用户对象
|
LoginSysUserTokenVo |
login(LoginParam loginParam)
登陆
|
void |
logout(javax.servlet.http.HttpServletRequest request)
退出
|
void |
refreshToken(JwtToken jwtToken,
javax.servlet.http.HttpServletResponse httpServletResponse)
如果(当前时间+倒计时) > 过期时间,则刷新token
并更新缓存
当前token失效,返回新token
当前请求有效,返回状态码:460
前端下次使用新token
如果token继续发往后台,则提示,此token已失效,请使用新token,不在返回新token,返回状态码:461
|
@Transactional(rollbackFor=java.lang.Exception.class) public LoginSysUserTokenVo login(LoginParam loginParam) throws Exception
LoginServicelogin in interface LoginServiceExceptionpublic void checkVerifyCode(String verifyToken, String code) throws Exception
LoginServicecheckVerifyCode in interface LoginServiceExceptionpublic void refreshToken(JwtToken jwtToken, javax.servlet.http.HttpServletResponse httpServletResponse) throws Exception
LoginServicerefreshToken in interface LoginServiceExceptionpublic void logout(javax.servlet.http.HttpServletRequest request)
throws Exception
LoginServicelogout in interface LoginServiceExceptionpublic SysUser getSysUserByUsername(String username) throws Exception
LoginServicegetSysUserByUsername in interface LoginServiceExceptionCopyright © 2019. All rights reserved.