public FubuContinuation Filter()
		{
			if (!_currentChain.IsInPartial())
			{
				_authentication.TryToApply();
			}

			return FubuContinuation.NextBehavior();
		}
Пример #2
0
        public IRenderableView BuildView()
        {
            if (_headers.IsAjaxRequest() || _chains.IsInPartial())
            {
                return(_factory.GetPartialView());
            }

            return(_factory.GetView());
        }
Пример #3
0
        public FubuContinuation Authenticate()
        {
            if (_currentChain.IsInPartial())
            {
                return(FubuContinuation.NextBehavior());
            }

            var result = _authentication.TryToApply();

            if (result.Continuation != null)
            {
                return(result.Continuation);
            }

            return(result.Success ? FubuContinuation.NextBehavior() : _redirector.Redirect());
        }