示例#1
0
        private async Task <AuthenticationFailedContext> RunAuthenticationFailedEventAsync(WsFederationMessage message,
                                                                                           Exception exception)
        {
            Logger.LogTrace("AuthenticationFailed");
            var authenticationFailedContext = new AuthenticationFailedContext(Context, Options)
            {
                ProtocolMessage = message,
                Exception       = exception
            };

            await Options.Events.AuthenticationFailed(authenticationFailedContext);

            if (authenticationFailedContext.HandledResponse)
            {
                Logger.LogDebug("AuthenticationFailedContext.HandledResponse");
            }
            else if (authenticationFailedContext.Skipped)
            {
                Logger.LogDebug("AuthenticationFailedContext.Skipped");
            }

            return(authenticationFailedContext);
        }
 public virtual Task AuthenticationFailed(AuthenticationFailedContext context) => OnAuthenticationFailed(context);