Some of my tenants have a worker service implemented on-premises. I am authenticating them via the Client Credentials flow in my AuthServer. Now, I need to implement an authorization filter using an API key that is configured as a SettingDefinition for each tenant that needs to use these worker services.
My question is: How can I retrieve the provider key (tenant ID) based on the value of the API key setting? Then, I need to adjust the request scope to the tenant obtained from that provider key.
Currently I'm using the default background job manager and have this configuration for background jobs in my application.
But there's a specific background job that I do not want to retry in case of failure. How can I override default values just for this job?
I added this code in my AuthServerModule.cs ConfigureServices method
and this in my AuthServer.csproj
Also added this in my HttpApiHostModule.cs ConfigureServices method
and this in my HttpApi.Host.csproj
But it didn't work, the localization texts doesn't appear on the UI, neither are on the database.
I tried creating a development environment from scratch, cleaning and building the solution, deleting existing databases, clearing redis cache and running dbmigrator then authserver, api and angular frontend.
Thanks!
Is it possible to change localizations of the tenant related text on the login screen?
My application services are starting to get too big and now I'm looking to refactor it to make one method per application service (with one interface, input and output dto). How do you recommend to implement this? Do ABP has some base classes for it? Should I extend ApplicationService base class in each service? How can I call each one in the controller?
It worked, thank you!
Check the docs before asking a question: https://abp.io/docs/latest
Check the samples to see the basic tasks: https://abp.io/docs/latest/samples
The exact solution to your question may have been answered before, and please first use the search on the homepage.
Provide us with the following info:
🧐 Hint: If you are using the ABP Studio, you can see all the information about your solution from the configuration window, which opens when you right-click on the solution and click on the Solution Configuration
button.
Hello,
I added two extra columns to my Tenant entity and I need to make them available in angular through Config State Service (currentTenant property). How could I do this? What's the best approach?
ObjectExtensionManager.Instance.Modules()
.ConfigureSaas(saas =>
{
saas.ConfigureTenant(tenant =>
{
tenant.AddOrUpdateProperty<int>(
"MunicipioId",
property =>
{
property.UI.Lookup.Url = "/api/app/cidadaos/lookup/municipios";
property.UI.Lookup.DisplayPropertyName = "displayName";
//property.Attributes.Add(new RequiredAttribute());
//property.Attributes.Add(new LengthAttribute(minimumLength: 7, maximumLength: 7));
}
);
});
});
}
OneTimeRunner.Run(() =>
{
ObjectExtensionManager.Instance
.MapEfCoreProperty<Tenant, int>(
"MunicipioId",
(entityBuilder, propertyBuilder) =>
{
propertyBuilder.HasMaxLength(7);
propertyBuilder.IsRequired();
}
);
ObjectExtensionManager.Instance
.MapEfCoreProperty<Tenant, string>(
"MunicipioId_Text",
(entityBuilder, propertyBuilder) =>
{
propertyBuilder.HasMaxLength(255);
propertyBuilder.IsRequired();
propertyBuilder.HasColumnName("Municipio");
}
);
});
Thanks!
Thanks!