Open Closed

Plug-In Modules #3798

User avatar
imranStem created

I have microservice architecture and I want to integrate concurrent modules as a plugin.

I have downloaded the sample concurrent login module and built the project and put the dls in a folder.

I have registered this module as a plugin in the web gateway configuration.

  context.Services.AddApplication<ChurchPharmacyWebGatewayModule>(options =>
            options.PlugInSources.AddFolder(@"D:\abp\abp6\ChurchPharmacy\plugins", System.IO.SearchOption.AllDirectories);

When I run the project I am getting the below error in the web gateway.

  • ABP Framework version: v6.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

2 Answer(s)
  • User Avatar
    imranStem created

    I am trying to integrate concurrent login in the Identity service but the problem is I have version 6.0rc.5 with OpenIdDict integration and the concurrent login sample version is 6.0rc.2 with Identity server 4 integration.

    I am struggling to replace the below file to convert into OpenIdDict.

    using System;
    using System.Threading.Tasks;
    using IdentityServer4.AspNetIdentity;
    using IdentityServer4.Validation;
    using Microsoft.AspNetCore.Identity;
    using Microsoft.Extensions.Localization;
    using Microsoft.Extensions.Logging;
    using Microsoft.Extensions.Options;
    using Volo.Abp.Data;
    using Volo.Abp.DependencyInjection;
    using Volo.Abp.Identity;
    using Volo.Abp.IdentityServer.AspNetIdentity;
    using Volo.Abp.IdentityServer.Localization;
    using IdentityUser = Volo.Abp.Identity.IdentityUser;
    namespace ChurchPharmacy.IdentityService.AspNetIdentity;
    public class ConcurrentLoginResourceOwnerPasswordValidator : AbpResourceOwnerPasswordValidator
        public ConcurrentLoginResourceOwnerPasswordValidator(
            Microsoft.AspNetCore.Identity.UserManager<IdentityUser> userManager,
            Microsoft.AspNetCore.Identity.SignInManager<IdentityUser> signInManager,
            IdentitySecurityLogManager identitySecurityLogManager,
            ILogger<ResourceOwnerPasswordValidator<IdentityUser>> logger,
            IStringLocalizer<AbpIdentityServerResource> localizer, IOptions<AbpIdentityOptions> abpIdentityOptions,
            IHybridServiceScopeFactory serviceScopeFactory, IOptions<IdentityOptions> identityOptions) : base(userManager,
            signInManager, identitySecurityLogManager, logger, localizer, abpIdentityOptions, serviceScopeFactory,
        protected override async Task SetSuccessResultAsync(ResourceOwnerPasswordValidationContext context, IdentityUser user)
            user.SetProperty(ConcurrentLoginConsts.ConcurrentLoginToken, Guid.NewGuid().ToString("N"));
            await UserManager.UpdateAsync(user);
             await base.SetSuccessResultAsync(context, user);
  • User Avatar
    enisn created
    Support Team .NET Developer

    Hi, Can you validate that compiled DLL files and your end application are using the same version of ABP?

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11