hi
abp generate-proxy -t csharp -u "https://demo.channelengine.net/"
hi
I will check your project and We have new advice from openiddict
https://github.com/abpframework/abp/issues/14312#issuecomment-1304106494
hi
You can try redirecting to the Login page in this method.
https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.AspNetCore.Components.Web/Volo/Abp/AspNetCore/Components/Web/ExceptionHandling/UserExceptionInformer.cs#L34
https://support.abp.io/QA/Questions/2415/Overriding-Default-Error-Handling-Message-In-Blazor-App#answer-faa51288-59e4-197b-6308-3a0163288866
ok
hi
AddDevelopmentEncryptionAndSigningCertificate
cannot be used in applications deployed on IIS or Azure App Service: trying to use them on IIS or Azure App Service will result in an exception being thrown at runtime (unless the application pool is configured to load a user profile). To avoid that, consider creating self-signed certificates and storing them in the X.509 certificates store of the host machine(s). Please refer to: https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html#registering-a-development-certificate
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<OpenIddictServerBuilder>(builder =>
{
builder.AddEventHandler(MyPrepareAccessTokenPrincipal.Descriptor);
});
}
using System.Security.Claims;
using OpenIddict.Abstractions;
using OpenIddict.Server;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Security.Claims;
namespace MyPrepareAccessTokenPrincipal;
public class CoMedClaimsPrincipalContributor : IAbpClaimsPrincipalContributor, ITransientDependency
{
public async Task ContributeAsync(AbpClaimsPrincipalContributorContext context)
{
var identity = context.ClaimsPrincipal.Identities.FirstOrDefault();
identity?.AddClaim(new Claim("SocialSecurityNumber", "Old SocialSecurityNumber"));
await Task.CompletedTask;
}
}
public class MyPrepareAccessTokenPrincipal : IOpenIddictServerHandler<OpenIddictServerEvents.ProcessSignInContext>
{
public static OpenIddictServerHandlerDescriptor Descriptor { get; }
= OpenIddictServerHandlerDescriptor.CreateBuilder<OpenIddictServerEvents.ProcessSignInContext>()
.AddFilter<OpenIddictServerHandlerFilters.RequireAccessTokenGenerated>()
.UseSingletonHandler<MyPrepareAccessTokenPrincipal>()
.SetOrder(OpenIddictServerHandlers.PrepareAccessTokenPrincipal.Descriptor.Order + 1)
.SetType(OpenIddictServerHandlerType.Custom)
.Build();
public ValueTask HandleAsync(OpenIddictServerEvents.ProcessSignInContext context)
{
var identity = context.AccessTokenPrincipal?.Identities.FirstOrDefault();
identity?.RemoveClaims("SocialSecurityNumber");
identity?.AddClaim(new Claim("SocialSecurityNumber", DateTime.Now.ToString("s")));
return default;
}
}
hi mgurer
I confirmed that CoMedClaimsPrincipalContributor will not be called, Dynamic cliams may not be added or replaced. I will provide a solution as soon as possible,
hi
https://docs.abp.io/en/commercial/latest/modules/identity/ldap