AuthConstant.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace ERP.Framework.Constants
  7. {
  8. public class AuthConstant
  9. {
  10. /// <summary>
  11. /// 权鉴 Hearder
  12. /// </summary>
  13. public const string HEADER = "Authorization";
  14. /// <summary>
  15. /// 登录用户密码错误
  16. /// </summary>
  17. public const string PASSWORD_ERROR = "auth:password-error:";
  18. /// <summary>
  19. ///
  20. /// </summary>
  21. public const string ONLINE_TOKEN = "auth:online-token:";
  22. /// <summary>
  23. /// 最后一次登录时间(时限为token 长久有效期),
  24. /// null为token失效
  25. /// -1 为被踢出
  26. /// -2 为被顶下线
  27. /// </summary>
  28. public const string LAST_ACTIVITY = "auth:last-activity:";
  29. /// <summary>
  30. /// 用戶信息
  31. /// </summary>
  32. public const string USER_INFO = "auth:user-info:";
  33. /// <summary>
  34. /// Token List
  35. /// </summary>
  36. public const string TOKEN_LIST = "auth:token-list:";
  37. /// <summary>
  38. /// 被踢下线
  39. /// </summary>
  40. public const string KICKED_OFF = "-1";
  41. /// <summary>
  42. /// 被顶下线
  43. /// </summary>
  44. public const string SUBSTITUTED = "-2";
  45. /// <summary>
  46. /// 首次密码错误
  47. /// </summary>
  48. public const string FIRST_PASSWORD_ERROR = "1";
  49. }
  50. }