123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- /*
- * *************************************************
- * 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<UserInfo> 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();
- }
|