Hello ABP Support Team,
I am currently trying to completely customize the UI of the default login page for my application, but I am running into some architectural/compilation issues.
Here is my current setup:
UI Framework: Blazor Server
Architecture: Monolithic (I do not have a separate .AuthServer project; everything is unified in my Axialease.Extranet.Blazor project).
My Goal: I want to override the default Razor Page for the login (Login.cshtml) to create a custom split-screen design, while keeping the default C# code-behind logic (LoginModel).
What I've Tried: I have already searched the official documentation and support forums for existing solutions. However, every example and solution I found assumes the presence of a separate .AuthServer project, which does not apply to my monolithic architecture.
Thank you very much β it works perfectly now! I had mistakenly referenced the Application.Contracts project instead of the HttpApi.Client one.
Here is the configuration I currently have:
It uses the admin user account (which I donβt think is the best approach).
"IdentityClients": {
"Marylease": {
"GrantType": "password",
"ClientId": "APP2_App",
"UserName": "admin",
"UserPassword": "1q2w3E*",
"Authority": "https://localhost:44335",
"Scope": "APP2"
}
}
So my question is: what would be the best practice in this case?
Here's how APP1 currently accesses APP2's remote service, and we'd like to maintain this simplicity:
// In APP1 (Client - Blazor Server)
public class MyLocalApp1Service : App1ServiceBase, IMyLocalApp1Service
{
private readonly IApp2RemoteService _app2RemoteServiceProxy; // Interface from APP2.Application.Contracts
public MyLocalApp1Service(IApp2RemoteService app2RemoteServiceProxy) // Proxy injection
{
_app2RemoteServiceProxy = app2RemoteServiceProxy;
}
public async Task<ResultDto> CallApp2ServiceAsync()
{
// We want authentication to be handled automatically here
var resultFromApp2 = await _app2RemoteServiceProxy.SomeMethodOnApp2Async();
// ... process result ...
return resultFromApp2;
}
}
Our main question is:
How can we configure APP1 (the client) to authenticate automatically (obtain and use a token via Client Credentials) when using dynamic HTTP client proxies (like IApp2RemoteService in the example), without APP1's application code (like MyLocalApp1Service) having to explicitly manage the authentication process? Is there a specific configuration or "handler" in ABP's HTTP client pipeline that enables this transparently for the caller?
We've reviewed the documentation and previous discussions regarding ClientPermissionValueProvider for the authorization part on APP2, which is clear. However, we're specifically looking for guidance on the APP1 client-side configuration to ensure that injecting and calling the remote service interface handles authentication "under the hood."
We are not planning to use Integration Services at this time, as some APIs will be shared and need to remain standard, visible, and authenticated REST APIs.
Could you please point us to the recommended configuration or an example illustrating this transparent handling of Client Credentials authentication for dynamic HTTP client proxies?
We are willing to share our current functional repository, which includes a docker-compose.yml setup for launching the environment (two ABP Blazor Server projects with APP1 referencing APP2's Application.Contracts layer), if that would help. A small Proof of Concept (POC) demonstrating a remote call similar to what we've achieved, but with very basic authentication added, would be incredibly helpful.
Thankscontinuity for your assistance.
Best regards,
Vivien
Hello ABP Team,
In our project, we have two independent ASP.NET Core applications built with the ABP Framework: APP1 and APP2.
We successfully set up inter-application communication using ABP dynamic HTTP client proxies and REST APIs exposed by Marylease. The communication is functional and relies on a shared contract project (APP2.Application.Contracts), without any authentication for now.
π― Goal We would like to secure this communication by enabling OAuth2 authentication using the Client Credentials flow, but without enforcing any permission or role checks on APP1's side.
The main objective is simply to ensure that only the APP1 client is authorized to call APP2 services, without implementing full ABP permission management.
public class APP1ApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpAutoMapperOptions>(options => { options.AddMaps<APP1ApplicationModule>(); });
context.Services.AddHttpClientProxies(
typeof(IHelloMaryleaseAppService)
.Assembly,
"APP2"
);
}
}
Hi, I didn't have Yarn installed, once the installation was done I recovered all the libs.
I just sent it to you, did you receive it?
I tried but I didn't get any new libs
Here is the file : { "version": "1.0.0", "name": "my-app", "private": true, "dependencies": { "@volo/language-management": "~9.0.0", "@volo/file-management": "~9.0.0", "@volo/chat": "~9.0.0", "@volo/account": "~9.0.0", "@volo/abp.aspnetcore.mvc.ui.theme.leptonx": "~4.0.0", "@volo/aspnetcore.components.server.leptonxtheme": "~4.0.0" } }
I didn't do anything specific, I created the project via the abp studio CLI.