Activities of "viswajwalith"

Answer

sure will do by EOD or tomorrow to ur email.

Answer

hi

context.Services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme) 
            .AddJwtBearer(options => 
            { 
                options.Authority = configuration["AuthServer:Authority"]; 
                options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]); 
                options.Audience = "BookPro"; 
            }) 
            .AddMicrosoftIdentityWebApp( 
                microsoftIdentityOptions => 
                { 
                    microsoftIdentityOptions.Instance = "https://exceegobtoc.xxx.com/"; 
                    microsoftIdentityOptions.Domain = "xxx.onmicrosoft.com"; 
                    microsoftIdentityOptions.TenantId = "xxx"; 
                    microsoftIdentityOptions.ClientId = "xxx"; 
                    microsoftIdentityOptions.ClientSecret = "xxx"; 
 
                    microsoftIdentityOptions.CallbackPath = "/signin-oidc-demo"; 
                    microsoftIdentityOptions.SignedOutCallbackPath = "/signout-callback-oidc"; 
                    microsoftIdentityOptions.SignUpSignInPolicyId = "xxx"; 
                }, 
                cookieAuthenticationOptions => 
                { 
 
                }, 
                OpenIdConnectDefaults.AuthenticationScheme, 
                CookieAuthenticationDefaults.AuthenticationScheme, 
                false, 
                null); 
 
        context.Services.PostConfigure<OpenIdConnectOptions>(OpenIdConnectDefaults.AuthenticationScheme, options => 
        { 
            options.SignInScheme = IdentityConstants.ExternalScheme; 
            options.ClaimActions.Add(new AddClaims()); 
        }); 
class AddClaims : ClaimAction 
{ 
    public AddClaims() 
        : base(null, null) 
    { 
    } 
 
    public override void Run(JsonElement userData, ClaimsIdentity identity, string issuer) 
    { 
        var sub = identity.Claims.FirstOrDefault(x => x.Type == "sub"); 
        if (sub != null) 
        { 
            identity.AddClaim(new Claim(ClaimTypes.NameIdentifier, sub.Value)); 
        } 
 
        var emails = identity.Claims.FirstOrDefault(x => x.Type == "emails"); 
        if (emails != null) 
        { 
            identity.AddClaim(new Claim(ClaimTypes.Email, emails.Value)); 
        } 
    } 
} 
`` 

Hi, It seems you are trying with Single Application, But the issue is with Micro Service Solution, After making the changes as per your suggestion able to add additional claims. Updated claim info is as follows.

Note: Application UI means our Client Application built using MVC 6 as part of Micro Service solution.

In simple words, able to have the login process in AuthServer, but when we are trying to call our Application UI it will be redirected to Auth Server(as the user is un authenticated for the first time) right then we are still getting the below error

Also tried by adding the below code but not luck

services.AddIdentityServer(options => { options.UserInteraction = new UserInteractionOptions() { LogoutUrl = "/account/logout", LoginUrl = "/account/login", LoginReturnUrlParameter = "returnUrl" }; })

when we are giving the LoginURL as auth server ('https://localhost:44322'), from Web UI navigating to Auth Server --> Home Page of Auth Server

when we are giving the LoginURL as Web UI ('https://localhost:44321'), from Web UI navigating to Web UI again and again and going to infinite loop.

Let me know if you need more details.

Answer

Thanks for the input, We will check ASAP and update you back

Answer

hi

Please share your azure configuration info and test account&password to liming.ma@volosoft.com

I just sent a details to your email

as per understanding GetAsync method of AbpApplicationConfigurationAppService will be useful for adding or modifying the Application Configuration Endpoint right? do u think this this Method will be called for all service calls from the application?

Yes, you should override the GetAsync method to modify the Application Configuration Endpoint (if your version is lower than v6.0). This endpoint calls by some framework services. (provides localization key-values, permissions etc.)

Thanks for the response @engincan, but I think there is some miss understanding. we are looking to add additional info (custom headers and adding additional query parameter for the request URI) for all of the API calls. but AbpApplicationConfigurationAppService only talks about configuration API right....?

Thanks for the response, but it looks like this will work in 6.0 only as of now ours is 5.1.3 , do u have any alternate for this or do we need to upgrade to 6.0?

If you do not want to upgrade your project, you can override the GetAsync method of AbpApplicationConfigurationAppService in your project and update it to your needs.

as per understanding GetAsync method of AbpApplicationConfigurationAppService will be useful for adding or modifying the Application Configuration Endpoint right? do u think this this Method will be called for all service calls from the application?

Hi @viswajwalith ,

That's fine, at least can you point the code/file where we had to inject some additional logic before the call of any API call happening from the application.

https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs#L85-L122


You can add some additional properties to this endpoint without overriding the AbpApplicationConfigurationAppService, you can read this article to see how to extend this endpoint and get a general knowledge about this endpoint.

Thanks for the response, but it looks like this will work in 6.0 only as of now ours is 5.1.3 , do u have any alternate for this or do we need to upgrade to 6.0?

hi

This is an endpoint that the framework has to call, you can't prevent it.

That's fine, at least can you point the code/file where we had to inject some additional logic before the call of any API call happening from the application.

We have tried HttpContextIdentityModelRemoteServiceHttpClientAuthenticator but not all API calls are coming under this unless we included the webgateway. Please advise if we missed anything.

hi

It works for the framework. You don;t need to call it.

But when the application is starting up, it it being called internally can you guide us in preventing the calling of those (MVC UI)

Hi

Steps to reproduce the issue

-installed Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX package to existing project (5.1.3 version ) -Deleted <PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton" Version="5.1.3" /> reference in web Proj file -Deleted "using Volo.Abp.LeptonTheme.Management;" references from web module class files. -added this to web module class file "using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX;" -added "typeof(AbpAspNetCoreMvcUiLeptonXThemeModule)" in class file -removed all references related to old lepton theme like Bundling, Components and below reference @using Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton.Themes.Lepton.Components.Content.Alerts @using Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton.Themes.Lepton.Components.Content.BreadCrumb @using Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton.Themes.Lepton.Components.Content.Title @using Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton.Themes.Lepton.Components.Header @using Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton.Bundling

Showing 91 to 100 of 242 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 20, 2024, 08:30