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

50 lines
1.4 KiB

3 years ago
namespace learun.operat
{
/// <summary>
/// 版 本 EasyCode EC管理后台
/// Copyright (c) 2019-present EC管理有限公司
/// 创建人:tobin
/// 日 期:2019.09.12
/// 描 述:当前连接用户信息处理类
/// </summary>
public interface IOperator
{
///// <summary>
///// 判断是否登录
///// </summary>
///// <param name="account">账号</param>
///// <param name="token">token</param>
///// <returns></returns>
//Task<bool> IsOnLine(string account, string token);
///// <summary>
///// 添加登录者
///// </summary>
///// <param name="account">账号</param>
///// <returns></returns>
//Task<string> AddLoginUser(string account);
///// <summary>
///// 清除登录者信息
///// </summary>
///// <param name="account">登录者用户账号</param>
///// <returns></returns>
//Task ClearLoginUser(string account);
/// <summary>
/// 生成jwt令牌
/// </summary>
/// <param name="userId">用户id</param>
/// <param name="userName">用户名称</param>
/// <param name="account">用户账号</param>
/// <returns></returns>
string EncodeToken(string userId, string userName, string account);
/// <summary>
/// 解密jwt令牌
/// </summary>
/// <param name="token">令牌</param>
/// <returns>TokenExpiredException 时间过期,SignatureVerificationException 签证不正确</returns>
string DecodeToken(string token);
}
}