namespace Infrastructure.Auth
{
///
/// 当前登录用户相关
///
public class UserContext
{
public static dynamic CurrentUser
{
get
{
IAuthenticationService authenticationService = DIContainer.ResolvePerHttpRequest();
var currentUser = authenticationService.GetAuthenticatedUser();
if (currentUser != null)
return currentUser;
return null;
}
}
}
}