You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.3 KiB
C#

5 months ago
/*
*
* 1便webapi
* 2便使mock
*/
using Infrastructure;
using OpenAuth.App.SSO;
namespace OpenAuth.App.Interface
{
public interface IAuth
{
/// <summary>
/// 检验token是否有效
/// </summary>
/// <param name="token">token值</param>
/// <param name="otherInfo"></param>
/// <returns></returns>
bool CheckLogin(string token = "", string otherInfo = "");
AuthStrategyContext GetCurrentUser();
string GetUserName(string otherInfo = "");
string GetUserNickName(string otherInfo = "");
string GetUserId(string otherInfo = "");
/// <summary>
/// 登录接口
/// </summary>
/// <param name="appKey">登录的应用appkey</param>
/// <param name="username">用户名</param>
/// <param name="pwd">密码</param>
/// <returns></returns>
Response<LoginResult> Login(string appKey, string username, string pwd);
/// <summary>
/// 退出登录
/// </summary>
/// <returns></returns>
bool Logout();
void CoverToken(string account, string name);
bool IsSystem();
}
}