![]() |
1
1
httpContext上的一个扩展方法signinasync允许您传递任何与登录相关的额外声明。如果在从accountcontroller调用signinasync时添加了__building__building和_building_station_作为声明,则应该能够通过httpcontext访问它。 为此,您需要通过依赖项注入将httpContextAccessor添加到iprofileService实现中,一旦从中获取httpContext,您就应该能够在httpContext.user中找到适当的声明。 |
![]() |
hashbytes · 在构造函数中调用异步函数。 6 年前 |