/* * ************************************************* * Copyright (c) 2018 QMTH. All Rights Reserved. * Created by Deason on 2018-07-31 17:40:42. * ************************************************* */ package cn.com.qmth.examcloud.app.service; import cn.com.qmth.examcloud.app.model.LoginInfo; import cn.com.qmth.examcloud.app.model.Result; import cn.com.qmth.examcloud.app.model.UserInfo; /** * 认证中心业务服务接口 * * @author: fengdesheng * @since: 2018/7/31 */ public interface UserAuthService { /** * 用户登录 * * @param loginInfo * @return * @throws Exception */ Result login(LoginInfo loginInfo) throws Exception; /** * 用户退出登录 * * @param key * @param token * @return * @throws Exception */ Result logout(String key, String token) throws Exception; /** * 获取用户信息 * * @param key * @param token * @return * @throws Exception */ @Deprecated Result getUserInfo(String key, String token) throws Exception; /** * 修改密码 * * @param key * @param token * @param studentId * @param password * @param newPassword * @return * @throws Exception */ Result updateStudentPassword(String key, String token, Long studentId, String password, String newPassword) throws Exception; /** * 重置密码 * * @param key * @param token * @param newPassword * @return * @throws Exception */ Result resetStudentPassword(String key, String token, String newPassword) throws Exception; /** * 获取短信验证码 * * @param key * @param token * @param phone * @return * @throws Exception */ Result sendSmsCode(String key, String token, String phone) throws Exception; /** * 获取短信验证码 * * @param key * @param token * @param phone * @return * @throws Exception */ Result code4Student(Long rootOrgId, String phone, Boolean bound) throws Exception; /** * 保存用户绑定的手机号 * * @param key * @param token * @param phone * @param code * @return * @throws Exception */ Result userBindingPhone(String key, String token, String phone, String code) throws Exception; /** * 缓存用户登录信息 * * @param loginInfo * @param key */ void cacheLoginInfo(LoginInfo loginInfo, String key); /** * 获取缓存中的用户登录信息 * * @param key * @return */ LoginInfo getLoginInfo(String key); /** * 获取平台端的默认过期时间(秒) * * @return */ int getSessionTimeout(); /** * 初始化内部接口请求鉴权 */ void initRequestTrace(); }