- ABP Framework version: v7.0.x
- UI type: Angular
- DB provider: EF Core
Need guidance on the following: I need to create a separate application for report processing but need to be able to authenticate and read the claims of the user requesting the reports using the same credentials from the application to be able to know the tenantid and connect to the right database. The reports will be displayed in the angular application in an iframe.
7 Answer(s)
-
0
Hi,
The report application can be used as an API service.
You can check this: https://docs.abp.io/en/commercial/latest/startup-templates/microservice/add-microservice#authserver-configuration
-
0
Will this work if I'm not using a microservice architecture?
-
0
Hi,
Yes, you also need to configure authentication in the service
For example:
private void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration) { context.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) .AddJwtBearer(options => { options.Authority = configuration["AuthServer:Authority"]; options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]); options.Audience = "ReportService"; }); }
-
0
Trying to create the service as suggested but getting an error that says: Could not find a part of the path 'C:\Repos\CompuCare\aspnet-core\apps\auth-server'.
-
0
-
0
I think I figured it out, thank you. Would I take the same approach to host a Hangfire server independently from the main API?
-
0
Hi,
hangfire can run in distributed and cluster environments, you can configure the same or different connection strings for it.
If you want all services to use hangfire, you need to install for them all