Activities of "christophe.baille"

I run ABP Suite (which is up to date)

I then removed and put back my solution from ABP Suite in case it will cause issues

Then "Update all AP packages"

I then got his message (updated to 5.3.2?)

But see that my package is updated to 5.3.3

I tried to run "Update NPM packages" and "Update NuGet packages" individually, but get the same message, only 5.3.2

For information, if I create a new solution it create everything with 5.3.3 version

Hello,

Yes, I did. But yesterday I tried to update from 5.3.2 to 5.3.3 and it does not update packages on .csproj files. .json files have version updated though

Hi,

Noted, thanks for the quick reply

The issue https://support.abp.io/QA/Questions/3454/Can-not-update-ABP-packages-to-532-through-ABP-suite have been locked but it is not fixed.

I have the issue again while trying to update from 5.3.2 to 5.3.3.

And refund me a ticket please as the other one have been locked with an answer that didn't help

  • ABP Framework version: vX.X.X
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

We created a module that we already use in one of our solutions, now we would like to use it in another ABP solution we made previously.

Is there anyway to have it show on the Modules list of ABP suite? So we will not have to add references manually on each projects of the solution we want to add it.

I guess if possible, it should be referenced as a nugget package?

I am coming back to you as I just saw this announcement

https://github.com/abpframework/abp/issues/11989

Should I then migrate to v6.0-RC instead and use OpenIddict?

I am still not very clear on how to use IdentityServer, so maybe better to focus on OpenIddict instead.

One more point, as not sure I understood well: will I be able to login externally (either IdentityServer or OpenIddict) with an existing ABP user I created through my Blazor server application?

OK thanks, it was a bit my guess that ABP had something more convenient to issue tokens when we implemented that way.

However, I do not find much doc on Abp on how to request a token

I see that I need to create a resource, I have one created by default

https://docs.abp.io/en/commercial/latest/modules/identity-server#api-resource-management

but then where do I need to make my call and with which parameters?

I saw this on features presentation, but can't find docs

I had a look on swagger and do find any methods about issuing token.

All needs to be done through the UI? Means if I make something in local, I will need to create the same "elements" from the UI on our servers?

Thanks

Issue with * ABP Framework version: v5.3.2

  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

We have a Blazor server application where we did implement external login.

To do so, we did create a method that create us a token

        `var tokenDescriptor = new SecurityTokenDescriptor
        {
            Subject = claimsIdentity,
            Expires = DateTime.UtcNow.AddDays(7),
            SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature),

        };
        //creating a token handler
        var tokenHandler = new JwtSecurityTokenHandler();
        var token = tokenHandler.CreateToken(tokenDescriptor);            
        var tokenDescriptor = new SecurityTokenDescriptor
        {
            Subject = claimsIdentity,
            Expires = DateTime.UtcNow.AddDays(7),
            SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature),

        };
        //creating a token handler
        var tokenHandler = new JwtSecurityTokenHandler();
        var token = tokenHandler.CreateToken(tokenDescriptor);

       var tokenDescriptor = new SecurityTokenDescriptor  `   

To make the authentication work, this part has been added to the BlazorModule ConfigureAuthentication method:

.AddJwtBearer("Default", options => { options.TokenValidationParameters = new TokenValidationParameters { ValidateIssuer = false, ValidateAudience = false, ValidateLifetime = true, ValidateIssuerSigningKey = true, IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(configuration["Jwt:SecretKey"])) }; });

After that, it was working fine, however, I met an issue with checking my user features:

await _featureChecker.IsEnabledAsync("AIGeneratorFeatures." + item)

was returning false all the time.

It has been fixed with this code

context.Services.AddAuthorization(options =>
{
    var defaultAuthorizationPolicyBuilder = new AuthorizationPolicyBuilder(
        JwtBearerDefaults.AuthenticationScheme, "Default");
        defaultAuthorizationPolicyBuilder.RequireAuthenticatedUser();
    options.DefaultPolicy = defaultAuthorizationPolicyBuilder.Build();
});

But then I got an issue when trying to "Login with this tenant" from my host admin (it was working well before).

HTTP ERROR 401

And I got this on the log file:

2022-08-02 16:47:10.338 +02:00 [INF] Authorization failed. These requirements were not met:
DenyAnonymousAuthorizationRequirement: Requires an authenticated user.
2022-08-02 16:47:10.360 +02:00 [INF] AuthenticationScheme: Bearer was challenged.
2022-08-02 16:47:10.362 +02:00 [INF] AuthenticationScheme: Default was challenged.

So from what I understand, the issue is from the "default" AddAuthorization.

Is there any way to have access to the _featureChecker without adding the code causing issues?

I was looking at some support tickets and was then wondering if we are creating the token the right way or if we should use ABP access/token instead, but I didn't find many docs on how to use it...

By using this custom token creator, I worry a bit that we might not have access to some methods/features from ABP.

Thanks for your support

Ok thanks, I will find another way then

If I restart the application yes it works (in VS at least). The issue here is that even if no need to deploy, I will need to edit the code as the json file is part of the code. My purpose is to let an admin (who is not a developer at all) manage plans by himself all through UI

Showing 61 to 70 of 188 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 20, 2024, 08:30