public void Login(WindowsSignInRequest request)
        {
            var currentUser = _windowsContext.CurrentUser();
            _session.MarkAuthenticated(currentUser);

            _writer.RedirectToUrl(request.Url ?? "~/");
        }
        public FubuContinuation Authenticate(WindowsSignInRequest request, WindowsPrincipal principal)
        {
            if (_handler.Authenticated(principal))
            {
                _session.MarkAuthenticated(principal.Identity.Name);
                _auditor.Audit(new SuccessfulWindowsAuthentication{User = principal.Identity.Name});
                
                return FubuContinuation.RedirectTo(request.Url);
            }
            else
            {
                _auditor.Audit(new FailedWindowsAuthentication{User = principal.Identity.Name});

                return FubuContinuation.RedirectTo(new LoginRequest {Url = request.Url}, "GET");
            }

            
            

            
        }
예제 #3
0
        public FubuContinuation Authenticate(WindowsSignInRequest request, WindowsPrincipal principal)
        {
            if (_handler.Authenticated(principal))
            {
                _session.MarkAuthenticated(principal.Identity.Name);
                _auditor.Audit(new SuccessfulWindowsAuthentication {
                    User = principal.Identity.Name
                });

                return(FubuContinuation.RedirectTo(request.Url));
            }
            else
            {
                _auditor.Audit(new FailedWindowsAuthentication {
                    User = principal.Identity.Name
                });

                return(FubuContinuation.RedirectTo(new LoginRequest {
                    Url = request.Url
                }, "GET"));
            }
        }
예제 #4
0
        public FubuContinuation Login(WindowsSignInRequest request)
        {
            var principal = _context.Current();

            return(_strategy.Authenticate(request, principal));
        }
 public FubuContinuation Login(WindowsSignInRequest request)
 {
     var principal = _context.Current();
     return _strategy.Authenticate(request, principal);
 }