But I still don't understand how each service can call right API to get data. Now I have the menu like this: Service A User Service B User
Please pay attention that all UI are hosted in Web project. When user click in User menu in each service, but it's the same URL, how ABP understand to navigate to different APIs of each service?
OK, let's use Identity module as an example. Now I want to use this module in 2 services concurently. As my understanding, all tables of Identity module will be created in database of each service. Right?
But the code to manage all those tables is located in Identity module. So how to reuse UI in Indentity module and get correct data of Identity module for each service? It means each service will have the same UI, just different data.
That is the problem I'm facing. Please show me your solution to reuse Identity module.
Hi,
In HttpApi I don't have any controller that implement the app service mannualy. The controllers are generated automatically by conventional controllers configured as my previous comment. Do I need to add HttpApi?
For your better suggestion. If I change my code like this:
public class CustomStaticDataTypeAppService : StaticDataTypeAppService, IStaticDataTypeAppService
{
public CustomStaticDataTypeAppService(IStaticDataTypeRepository staticDataTypeRepository, IStaticDataStructureRepository staticDataStructureRepository, IEmployeeRepository employeeRepository, IStringLocalizer<BaseComponentResource> baselocalizer) : base(staticDataTypeRepository, staticDataStructureRepository, employeeRepository, baselocalizer)
{
}
}
It means, if I don't use ICustomStaticDataTypeAppService, use IStaticDataTypeAppService directly, javascript proxy is generate normally. But the problem is APIs will be the same name because it use the same interface, so other services will call wrong APIs of a certain service.
I already configured conventional controller like this but it didn't help:
Configure<AbpAspNetCoreMvcOptions>(options =>
{
options.ConventionalControllers
.Create(typeof(AMLReportServiceApplicationModule).Assembly, opts =>
{
opts.RootPath = AMLReportServiceRemoteServiceConsts.ModuleName;
opts.RemoteServiceName = AMLReportServiceRemoteServiceConsts.RemoteServiceName;
});
});
Hi,
So, when dynamic claim is called? Every 1 hour?
Hi,
I fixed this issue by adding this code in WebModule to change Dynamic Claim URL for internal call in K8s
context.Services.Configure<AbpClaimsPrincipalFactoryOptions>(options =>
{
options.IsDynamicClaimsEnabled = true;
options.RemoteRefreshUrl = configuration["AuthServer:MetadataAddress"] + options.RemoteRefreshUrl.Replace(configuration["AuthServer:Authority"],""); --> ADDED THIS LINE
});
But can you explain why dynamic claim impact to Access Token lifetime?
Hi,
Already sent identitymodel.txt. Please check.
Hi,
Please check the logs I've sent to your email. After 1 hour, I access to another page and see this in Web log:
[10:13:25 INF] Sending HTTP request POST https://authserver.upgrade-staging.mizuho.vn/api/account/dynamic-claims/refresh
and K8s can not understand the domain (it should be http://authserver-upgrade-staging/api/account/dynamic-claims/refresh for internal call). In localhost, access token is still valid more than 1 hour
Hi,
I've sent the logs. Please check.
I don't set token lifetime for each Application. Only set this one in AuthServerModule. It will affect for all Application, right?
PreConfigure<OpenIddictServerBuilder>(builder =>
{
builder.SetAccessTokenLifetime(TimeSpan.FromHours(24));
});
I've sent you access token via email

As you can see exp is 24hours, but still unauthorized after 1 hour