Example #1
0
        //TODO: 8-9-2010 -- prevent against multiple hooks here

        #region IFailureHandler Members
        /// <summary>	Executes the authentication failure action. </summary>
        /// <remarks>	ebrown, 1/3/2011. </remarks>
        /// <param name="context">		    The incoming HttpContextBase. </param>
        /// <param name="inspectorResults">	The set of failed inspector results. </param>
        /// <returns>	An IPrincipal instance / ShouldTerminateRequest value as returned by the failure event handler. </returns>
        public override FailureHandlerAction OnAuthenticationFailure(
            HttpContextBase context,
            Dictionary <IAuthenticator,
                        AuthenticationResult> inspectorResults)
        {
            var eventArgs = new SimpleFailureEventArgs(Configuration, context, inspectorResults);

            AuthenticationFailure.SafeInvoke(this, eventArgs);

            return(new FailureHandlerAction()
            {
                User = eventArgs.IPrincipal, ShouldTerminateRequest = eventArgs.ShouldTerminateRequest
            });
        }