Activities of "mostafa_ibrahem22@hotmail.com"

Question
Question

How can I make EntityCreatedEto "Pre-Defined Events" In Distributed Event Bus consume from multiple Applications?

more explain

abp use "direct exchange", how can I change some "Pre-Defined Events" to fanout exchange or how can I use one message and multiple consumers?

  • ABP Framework version: v5.1.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

abp use ng-zorro-antd [https://ng.ant.design/docs/introduce/en] in pro account module, we use nz-tree-select [https://ng.ant.design/components/tree-select/en] but it not working because style.

how can use ng-zorro-antd in general, and how to fixed style problem.

  • ABP Framework version: v5.1.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • I Publish my application on - two Servers for API (API-SERVER-ONE , API-SERVER-TWO) and made f5 load balancer with url "API.xyz.com" - two Servers for SSO (SSO-SERVER-ONE , SSO-SERVER-TWO) and made f5 load balancer with url "sso.xyz.com" - two server angular (UI-SERVER-ONE , UI-SERVER-TWO) and made f5 load balancer with url "ui.xyz.com" - one server Redis

if first call F5 transfer request to generate token from API-SERVER-ONE that may be uses (SSO-SERVER-ONE or SSO-SERVER-TWO) and in second request if call F5 transfer request to generate token from API-SERVER-TWO that may be uses (SSO-SERVER-ONE or SSO-SERVER-TWO)

return Unauthorized

  • ABP Framework version: 5.1.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • HttpClient in angular not call HttpInterceptor

import { HttpClient } from '@angular/common/http'; private http: HttpClient this.http.get('https://localhost:44374/api/main-core/country/get-lookup-list').subscribe(r => { debugger; console.log(r); });

I'm use https://www.stimulsoft.com for report, stimulsoft internal use HttpClient, default or custom HttpInterceptors only called by RestService but not called when stimulsoft call API by Httpclient.

I'm try stimulsoft without abp, HttpInterceptors working fine, but inside abp HttpInterceptors not called

  • ABP Framework version: v5.1.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

how add Volo.TextTemplateManagement in Module Template (.NET & Angular)?

https://docs.abp.io/en/commercial/latest/modules/text-template-management#how-to-install

  • ABP Framework version: v5.1.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

ABP Framework version: commercial v 5.1.3 UI type: Angular DB provider: EF Core Tiered (MVC) or Identity Server Separated (Angular): yes

I added Hangfire and HealthCheckUI in HostAPI

app.UseAuthentication();
app.UseHangfireDashboard("/hangfire", new DashboardOptions
{
    AsyncAuthorization = new[] { new AbpHangfireAuthorizationFilter(requiredPermissionName: MainCorePermissions.HangfireDashboard.Default) }
});


services.Configure<AbpEndpointRouterOptions>(routerOptions =>
{
    routerOptions.EndpointConfigureActions.Add(endpointContext =>
    {
        endpointContext.Endpoints.MapHealthChecksUI(setupOption)
        .RequireAuthorization(MainCorePermissions.HangfireDashboard.Default);
    });
});

but it doesn't work because Authorizationfilter faild, i need to know how to authenticate the user to access hangfire and healthCheckUI

ABP Framework version: commercial v 5.1.3 UI type: Angular DB provider: EF Core Tiered (MVC) or Identity Server Separated (Angular): yes

I Create new fluter app and console app to access API

after login from HttpClient => call API return 403 Forbidden

[Authorize()] => Working 200 OK [Authorize(MainCorePermissions.Countries.Default)] => Not Working 403 Forbidden

app.settings.json

{ "RemoteServices": { "Default": { "BaseUrl": "https://localhost:44360/" }, "MainCore": { "BaseUrl": "https://localhost:44380/" }, "Naama": { "BaseUrl": "https://localhost:44358/" } }, "IdentityClients": { "Default": { "GrantType": "password", "ClientId": "MainCore_App", "ClientSecret": "1q2w3e*", "UserName": "admin", "UserPassword": "1q2w3E*", "Authority": "https://localhost:44360/", "Scope": "MainCore" }, "Naama": { "GrantType": "password", "ClientId": "Naama_App", "ClientSecret": "1q2w3e*", "UserName": "admin", "UserPassword": "1q2w3E*", "Authority": "https://localhost:44330", "Scope": "Naama" } } }

=============Code ==============================

using IdentityModel.Client; using Microsoft.Extensions.Configuration;

var builder = new ConfigurationBuilder().AddJsonFile("appsettings.json", optional: false);

IConfiguration _configuration = builder.Build();

//Obtain access token from the IDS4 server

// discover endpoints from metadata var client = new HttpClient(); var disco = await client.GetDiscoveryDocumentAsync(_configuration["IdentityClients:Default:Authority"]); if (disco.IsError) { Console.WriteLine(disco.Error); return; }

// request token var tokenResponse = await client.RequestPasswordTokenAsync(new PasswordTokenRequest { Address = disco.TokenEndpoint, ClientId = _configuration["IdentityClients:Default:ClientId"], ClientSecret = _configuration["IdentityClients:Default:ClientSecret"], UserName = _configuration["IdentityClients:Default:UserName"], Password = _configuration["IdentityClients:Default:UserPassword"], Scope = _configuration["IdentityClients:Default:Scope"] });

if (tokenResponse.IsError) { Console.WriteLine(tokenResponse.Error); return; }

Console.WriteLine(tokenResponse.Json);

//Perform the actual HTTP request

using (var httpClient = new HttpClient()) { httpClient.SetBearerToken(tokenResponse.AccessToken);

var url = _configuration["RemoteServices:MainCore:BaseUrl"] +
          "api/main-core/country";

var responseMessage = await httpClient.GetAsync(url);
if (responseMessage.IsSuccessStatusCode)
{
    var responseString = await responseMessage.Content.ReadAsStringAsync();
    Console.WriteLine("Result: " + responseString);
}
else
{
    throw new Exception("Remote server returns error code: " + responseMessage.StatusCode);
}

}

ABP Framework version: commercial v 5.1.3 UI type: Angular DB provider: EF Core Tiered (MVC) or Identity Server Separated (Angular): yes

I added external Idsrv4 to the abp Idsrv I want to logout form external Idsrv4 after logout from my app.

        context.Services.AddAuthentication()
        .AddJwtBearer(options =>
        {
            options.Authority = configuration["AuthServer:Authority"];
            options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]);
            options.Audience = configuration["AuthServer:ApiName"];
        }).AddOpenIdConnect("oidc", options =>
        {
            options.Authority = "https://localhost:44382/";
            options.ClientId = "main_core_idsrv";
            options.ClientSecret = "main_core_idsrv_secret_mvc";
            
            options.ClaimActions.MapJsonKey(ClaimTypes.NameIdentifier, "sub");
            
            options.ResponseType = OpenIdConnectResponseType.Code;
            options.SaveTokens = true;
            options.GetClaimsFromUserInfoEndpoint = true;   
            
            options.Scope.Clear();
            options.Scope.Add("openid");
            options.Scope.Add("profile");
            options.Scope.Add("email");
            
            options.Events = new OpenIdConnectEvents
            {
                OnTokenValidated = context =>
                {
                    var userID = context.Principal.FindFirstValue("sub");
                    return Task.CompletedTask;
                }};
        });
Showing 1 to 10 of 20 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11