您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

LuLoggedUserAccessor.cs 597B

123456789101112131415161718192021
  1. using Luticate2.Auth.Dbo.Users;
  2. using Luticate2.Auth.Interfaces.Users;
  3. using Microsoft.AspNetCore.Http;
  4. namespace Luticate2.Auth.Controllers
  5. {
  6. public class LuLoggedUserAccessor : ILuLoggedUserAccessor
  7. {
  8. private readonly IHttpContextAccessor _httpContextAccessor;
  9. public LuLoggedUserAccessor(IHttpContextAccessor httpContextAccessor)
  10. {
  11. _httpContextAccessor = httpContextAccessor;
  12. }
  13. public UsersDbo GetLoggedUser()
  14. {
  15. return _httpContextAccessor.HttpContext.GetLuLoggedUser();
  16. }
  17. }
  18. }