private async Task <MessageReceivedContext> RunMessageReceivedEventAsync(OpenIdConnectMessage message, AuthenticationProperties properties)
        {
            Logger.MessageReceived(message.BuildRedirectUrl());
            var messageReceivedContext = new MessageReceivedContext(Context, Options)
            {
                ProtocolMessage = message,
                Properties      = properties,
            };

            await Options.Events.MessageReceived(messageReceivedContext);

            if (messageReceivedContext.HandledResponse)
            {
                Logger.MessageReceivedContextHandledResponse();
            }
            else if (messageReceivedContext.Skipped)
            {
                Logger.MessageReceivedContextSkipped();
            }

            return(messageReceivedContext);
        }
 internal static Task MessageReceived(MessageReceivedContext context)
 {
     Helpers.ThrowIfConditionFailed(() => context.ProtocolMessage != null, "ProtocolMessage is null.");
     eventsFired.Add(nameof(MessageReceived));
     return Task.FromResult(0);
 }
Esempio n. 3
0
 /// <summary>
 /// Invoked when a protocol message is first received.
 /// </summary>
 public virtual Task MessageReceived(MessageReceivedContext context) => OnMessageReceived(context);
 private Task OpenIdMessageReceived(Microsoft.AspNetCore.Authentication.OpenIdConnect.MessageReceivedContext context)
 {
     _logger.LogDebug("MessageReceived!");
     return(Task.FromResult(0));
 }
 public override Task MessageReceived(MessageReceivedContext context)
 {
     return base.MessageReceived(context);
 }
Esempio n. 6
0
 public virtual Task MessageReceived(MessageReceivedContext context) => OnMessageReceived(context);