예제 #1
0
        public WcfWindowsUserInfo(ILogProvider logProvider, IWindowsSecurity windowsSecurity)
        {
            _logger = logProvider.GetLogger(GetType().Name);
            _performanceLogger = logProvider.GetLogger("Performance");

            _isUserRecognized = new Lazy<bool>(() => InitIsUserRecognized());
            _userName = new Lazy<string>(() => InitUserName());
            _workstation = new Lazy<string>(() => windowsSecurity.GetClientWorkstation());
            _windowsIdentity = new Lazy<WindowsIdentity>(() => InitWindowsIdentity());
        }
예제 #2
0
        public WcfWindowsUserInfo(ILogProvider logProvider, IWindowsSecurity windowsSecurity)
        {
            _logger            = logProvider.GetLogger(GetType().Name);
            _performanceLogger = logProvider.GetLogger("Performance");

            _isUserRecognized = new Lazy <bool>(() => InitIsUserRecognized());
            _userName         = new Lazy <string>(() => InitUserName());
            _workstation      = new Lazy <string>(() => windowsSecurity.GetClientWorkstation());
            _windowsIdentity  = new Lazy <WindowsIdentity>(() => InitWindowsIdentity());
        }
예제 #3
0
 public AspNetUserInfo(IWindowsSecurity windowsSecurity)
 {
     _isUserRecognized = new Lazy<bool>(() =>
         HttpContext.Current != null
         && HttpContext.Current.User != null
         && HttpContext.Current.User.Identity != null
         && HttpContext.Current.User.Identity.IsAuthenticated);
     _userName = new Lazy<string>(() => HttpContext.Current.User.Identity.Name);
     _workstation = new Lazy<string>(() => windowsSecurity.GetClientWorkstation());
 }
예제 #4
0
 public AspNetUserInfo(IWindowsSecurity windowsSecurity)
 {
     _isUserRecognized = new Lazy <bool>(() =>
                                         HttpContext.Current != null &&
                                         HttpContext.Current.User != null &&
                                         HttpContext.Current.User.Identity != null &&
                                         HttpContext.Current.User.Identity.IsAuthenticated);
     _userName    = new Lazy <string>(() => HttpContext.Current.User.Identity.Name);
     _workstation = new Lazy <string>(() => windowsSecurity.GetClientWorkstation());
 }
 public OwinUserInfo(IWindowsSecurity windowsSecurity)
 {
     _workstation = windowsSecurity.GetClientWorkstation();
 }