Browse Source

Update AttachAbpCustomChallengeErrors.cs

pull/14504/head
maliming 3 years ago
parent
commit
cd916da0ab
No known key found for this signature in database GPG Key ID: 96224957E51C89E
  1. 12
      modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Handlers/AttachAbpCustomChallengeErrors.cs

12
modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Handlers/AttachAbpCustomChallengeErrors.cs

@ -1,8 +1,6 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication;
using OpenIddict.Server; using OpenIddict.Server;
namespace Volo.Abp.OpenIddict.Handlers; namespace Volo.Abp.OpenIddict.Handlers;
@ -26,13 +24,9 @@ public class AttachAbpCustomChallengeErrors : IOpenIddictServerHandler<OpenIddic
{ {
Check.NotNull(context, nameof(context)); Check.NotNull(context, nameof(context));
var properties = context.Transaction.Properties[typeof(AuthenticationProperties).FullName!].As<AuthenticationProperties>(); foreach (var property in context.Properties.Where(x => CustomChallengeErrors.Contains(x.Key)))
if (properties != null)
{ {
foreach (var property in properties.Items.Where(x => CustomChallengeErrors.Contains(x.Key))) context.Response.SetParameter(property.Key, property.Value);
{
context.Response.SetParameter(property.Key, property.Value);
}
} }
return default; return default;

Loading…
Cancel
Save