Esempio n. 1
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"));
            }
        }
Esempio n. 2
0
        public FubuContinuation Login(WindowsSignInRequest request)
        {
            var principal = _context.Current();

            return(_strategy.Authenticate(request, principal));
        }