internal static Task AuthorizationResponseRecieved(AuthorizationResponseReceivedContext context) { Helpers.ThrowIfConditionFailed(() => context.AuthenticationTicket != null, "context.AuthenticationTicket is null."); Helpers.ThrowIfConditionFailed(() => context.AuthenticationTicket.Principal != null, "context.AuthenticationTicket.Principal is null."); Helpers.ThrowIfConditionFailed(() => context.AuthenticationTicket.Principal.Identity != null, "context.AuthenticationTicket.Principal.Identity is null."); Helpers.ThrowIfConditionFailed(() => !string.IsNullOrWhiteSpace(context.AuthenticationTicket.Principal.Identity.Name), "context.AuthenticationTicket.Principal.Identity.Name is null."); eventsFired.Add(nameof(AuthorizationResponseRecieved)); return(Task.FromResult(0)); }
// These method are overridden to make it easier to debug the OIDC auth flow. // ReSharper disable RedundantOverridenMember public override Task AuthorizationResponseReceived(AuthorizationResponseReceivedContext context) { return(base.AuthorizationResponseReceived(context)); }