Activities of "liangshiwei"

Hi,

After the deep check, it's really a problem, only working the first time.

You can try this:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using IdentityServer4.Configuration;
using IdentityServer4.Models;
using IdentityServer4.Stores;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Options;
using Volo.Abp.Caching;
using Volo.Abp.DependencyInjection;
using Volo.Abp.IdentityServer;
using Volo.Abp.IdentityServer.ApiResources;
using Volo.Abp.IdentityServer.ApiScopes;
using Volo.Abp.IdentityServer.IdentityResources;
using Volo.Abp.ObjectMapping;
using ApiResource = Volo.Abp.IdentityServer.ApiResources.ApiResource;
using ApiScope = Volo.Abp.IdentityServer.ApiScopes.ApiScope;
using IdentityResource = Volo.Abp.IdentityServer.IdentityResources.IdentityResource;

namespace Qa.Data;

[ExposeServices(typeof(ResourceStore), typeof(IResourceStore))]
public class MyResourceStore : ResourceStore
{
    public MyResourceStore(IIdentityResourceRepository identityResourceRepository,
        IObjectMapper<AbpIdentityServerDomainModule> objectMapper, IApiResourceRepository apiResourceRepository,
        IApiScopeRepository apiScopeRepository,
        IDistributedCache<IdentityServer4.Models.IdentityResource> identityResourceCache,
        IDistributedCache<IdentityServer4.Models.ApiScope> apiScopeCache,
        IDistributedCache<IdentityServer4.Models.ApiResource> apiResourceCache,
        IDistributedCache<Resources> resourcesCache, IOptions<IdentityServerOptions> options) : base(
        identityResourceRepository, objectMapper, apiResourceRepository, apiScopeRepository, identityResourceCache,
        apiScopeCache, apiResourceCache, resourcesCache, options)
    {
    }

    protected override async Task<IEnumerable<TModel>> GetCacheItemsAsync<TEntity, TModel>(
        IDistributedCache<TModel> cache, IEnumerable<string> keys, Func<string[], Task<List<TEntity>>> entityFactory,
        Func<List<TModel>, string, List<IEnumerable<KeyValuePair<string, TModel>>>> cacheItemsFactory,
        string cacheKeyPrefix = null)
    {
        var result = await base.GetCacheItemsAsync(cache, keys, entityFactory, cacheItemsFactory,
                cacheKeyPrefix);
      
        if (result is IEnumerable<IdentityServer4.Models.ApiResource> apiResources)
        {
            return (IEnumerable<TModel>) apiResources.DistinctBy(x => x.Name);
        }

        return result;
    }
}

Add your *.EntityFrameworkCore module

    public override void PreConfigureServices(ServiceConfigurationContext context)
    {
        QaEfCoreEntityExtensionMappings.Configure();
        
        PreConfigure<IIdentityServerBuilder>(builder =>
        {
            builder.AddResourceStore<MyResourceStore>();
        });
        
    }

Hi,

I have tested, and it works for me,

Here are my steps:

Scope

Api resource

Client

Postman

How about the error when editing the Identity Client?

Can you share the logs?

I think due to this error, the cache has not been removed.

Can you provide the full steps to reproduce? I will check it.

Hi,

If you haven't changed the method signature(method name, parameter, return type.. ) and route, then you don't need to regenerate.

However, you can run the abp generate command to re-generate client proxies.

Hi,

Yes, we cached the client, the cache item will remove when the client changed, See https://github.com/abpframework/abp/blob/dev/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerCacheItemInvalidator.cs#L33

However, you can set the expiration date, try:

Configure<IdentityServerOptions>(options =>
{
    options.Caching.ClientStoreExpiration = ....;
})

Hi,

We implemented this feature in 6.0(next version), so, it will come soon

Hi,

I test the project you provided, this is no problem.

I suppose there might a problem with your RabbitMQ server, could you try with another RabbitMQ again?

We do not see any records on AbpEventOutbox on v5.2.1 publisher project.

This is expected, the record will be deleted after published

Hi,

I will check it and back to you

Answer

An error occurred when the Organization Top-Level Move button was clicked

v5.3.0 or v5.3.2

Hi,

We created an internal issue and will fix it.

Hi,

Can you share a project with me? shiwei.liang@volosoft.com I will check it out.

Showing 591 to 600 of 2428 entries
Made with ❤️ on ABP v9.2.0-preview. Updated on January 24, 2025, 10:25