Activities of "mgurer"

  • ABP Framework version: v7.0.1

  • UI type: MVC

  • DB provider: EF Core

  • Tiered (MVC) or Identity Server Separated (Angular): yes

  • Exception message and stack trace:

  • Steps to reproduce the issue:" Hi I have just updated abp cli to v7.0.1

    Hi, I have created a new micro-service solution. abp new Demo -t microservice-pro -u mvc.

    When I try to restore packages using command "dotnet restore" in the solution root folder, no commercial package can be restored successfully.

    I have checked the nuget package sources, and following entry exists; source:https://nuget.abp.io/{my_private_key}/v3/index.json name:ABP Commercial NuGet Source

    Here are some error messages I get;

PS F:\Abp\Demo> dotnet restore Determining projects to restore... F:\Abp\Demo\services\product\src\Demo.ProductService.Domain.Shared\Demo.ProductService.Domain.Shared.csproj : error NU1101: Unable to find package Volo.Abp.Commercial.SuiteTemplates. No packages exist with this id in source(s): ABP Commercial NuGet Source, C:\Program Files\dotnet\library-packs, Microsoft Visual St udio Offline Packages, nuget.org [F:\Abp\Demo\Demo.sln] F:\Abp\Demo\services\product\src\Demo.ProductService.Application\Demo.ProductService.Application.csproj : error NU1101: Unable to find package Volo.Abp.Commercial.SuiteTemplates. No packages exist with this id in source(s): ABP Commercial NuGet Source, C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Packages, nuget.org [F:\Abp\Demo\Demo.sln] F:\Abp\Demo\services\saas\src\Demo.SaasService.Domain.Shared\Demo.SaasService.Domain.Shared.csproj : error NU1101: Unable to find package Volo.Saas.Domain.Shared. No packages exist with this id in source(s): ABP Commercial NuGet Source, C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Package s, nuget.org [F:\Abp\Demo\Demo.sln] F:\Abp\Demo\services\product\src\Demo.ProductService.Domain\Demo.ProductService.Domain.csproj : error NU1101: Unable to find package Volo.Abp.Commercial.SuiteTemplates. No packages exist with this id in source(s): ABP Commercial NuGet Source, C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline P ackages, nuget.org [F:\Abp\Demo\Demo.sln] F:\Abp\Demo\services\saas\src\Demo.SaasService.Domain.Shared\Demo.SaasService.Domain.Shared.csproj : error NU1101: Unable to find package Volo.Payment.Domain.Shared. No packages exist with this id in source(s): ABP Commercial NuGet Source, C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Pack ages, nuget.org [F:\Abp\Demo\Demo.sln] Failed to restore F:\Abp\Demo\services\product\src\Demo.ProductService.Domain.Shared\Demo.ProductService.Domain.Shared.csproj (in 1.49 sec). Failed to restore F:\Abp\Demo\services\saas\src\Demo.SaasService.Domain.Shared\Demo.SaasService.Domain.Shared.csproj (in 1.49 sec). Failed to restore F:\Abp\Demo\services\product\src\Demo.ProductService.Domain\Demo.ProductService.Domain.csproj (in 1.49 sec). Failed to restore F:\Abp\Demo\services\product\src\Demo.ProductService.Application\Demo.ProductService.Application.csproj (in 1.49 sec). F:\Abp\Demo\services\identity\src\Demo.IdentityService.HttpApi.Client\Demo.IdentityService.HttpApi.Client.csproj : error NU1101: Unable to find package Volo.Abp.Identity.Pro.HttpApi.Client. No packages exist with this id in source(s): ABP Commercial NuGet Source, C:\Program Files\dotnet\library-packs, Microsoft Vi sual Studio Offline Packages, nuget.org [F:\Abp\Demo\Demo.sln] F:\Abp\Demo\services\identity\src\Demo.IdentityService.HttpApi.Client\Demo.IdentityService.HttpApi.Client.csproj : error NU1101: Unable to find package Volo.Abp.OpenIddict.Pro.HttpApi.Client. No packages exist with this id in source(s): ABP Commercial NuGet Source, C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Packages, nuget.org [F:\Abp\Demo\Demo.sln] F:\Abp\Demo\services\identity\src\Demo.IdentityService.HttpApi.Client\Demo.IdentityService.HttpApi.Client.csproj : error NU1101: Unable to find package Volo.Abp.Account.Pro.Admin.HttpApi.Client. No packages exist with this id in source(s): ABP Commercial NuGet Source, C:\Program Files\dotnet\library-packs, Microso ft Visual Studio Offline Packages, nuget.org [F:\Abp\Demo\Demo.sln] F:\Abp\Demo\services\identity\src\Demo.IdentityService.HttpApi.Client\Demo.IdentityService.HttpApi.Client.csproj : error NU1101: Unable to find package Volo.Abp.Identity.Pro.Application.Contracts. No packages exist with this id in source(s): ABP Commercial NuGet Source, C:\Program Files\dotnet\library-packs, Micro soft Visual Studio Offline Packages, nuget.org [F:\Abp\Demo\Demo.sln] F:\Abp\Demo\services\identity\src\Demo.IdentityService.HttpApi.Client\Demo.IdentityService.HttpApi.Client.csproj : error NU1101: Unable to find package Volo.Abp.OpenIddict.Pro.Application.Contracts. No packages exist with this id in source(s): ABP Commercial NuGet Source, C:\Program Files\dotnet\library-packs, Mic rosoft Visual Studio Offline Packages, nuget.org [F:\Abp\Demo\Demo.sln] F:\Abp\Demo\services\identity\src\Demo.IdentityService.HttpApi.Client\Demo.IdentityService.HttpApi.Client.csproj : error NU1101: Unable to find package Volo.Abp.Account.Pro.Admin.Application.Contracts. No packages exist with this id in source(s): ABP Commercial NuGet Source, C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Packages, nuget.org [F:\Abp\Demo\Demo.sln] F:\Abp\Demo\services\identity\src\Demo.IdentityService.HttpApi.Client\Demo.IdentityService.HttpApi.Client.csproj : error NU1101: Unable to find package Volo.Abp.Identity.Pro.Domain.Shared. No packages exist with this id in source(s): ABP Commercial NuGet Source, C:\Program Files\dotnet\library-packs, Microsoft Vis ual Studio Offline Packages, nuget.org [F:\Abp\Demo\Demo.sln] . . .

Regards Murat Gürer

  • ABP Framework version: v6.0.1
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"Hi, I am using microservices pro template and upgraded my project to use openiddict. I want to be able to set different token expiration values for each open-id application when using client-credentials flow. Some global values are set in auth-server/*module.cs but it is not suitable for my case. Here there is a suggested solution, but I cant figure out where to implement it; https://stackoverflow.com/questions/42442109/is-there-a-way-to-have-different-ticket-expiry-lengths-in-openiddict . I will be glad if you have any suggestions. Thanks.
  • ABP Framework version: v6.0.1
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace: token endpoint accept-language header is ignored.
  • Steps to reproduce the issue
  • Hello

I have created a new demo app with following command; abp new CoMed -t microservice-pro -u blazor

I added a new openid application named demo with password 123456 and enabled all scopes. I altered demo application to accept passwrod, clientcredentials and refresh token flows.

I finally tried https://localhost:44322/connect/token end point with password flow. I used demo as client id and admin as username. I typed client password wrong to see the error message. I got "Invalid username or password!" error. I added "Accept-Language" header with value "tr". I tried again and error message is not localized.

Token endpoint ignores the accept-language header.

I tested same flow with version 5.X, header worked as expected.

Any suggestions?

Answer

Hi maliming.

Thank you.

The new solution works as expected.

It is way better than the previous one.

Answer

Any suggestions????

Answer

Here is the CoMedClaimsPrincipalContributor.cs used in test;

using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Security.Claims;

namespace CoMed.AuthServer;

public class CoMedClaimsPrincipalContributor : IAbpClaimsPrincipalContributor, ITransientDependency
{
    public async Task ContributeAsync(AbpClaimsPrincipalContributorContext context)
    {
        await Task.CompletedTask;
    }
}

steps to create a test;

mkdir CoMed
cd CoMed
abp new CoMed -t microservice-pro -u blazor

cd etc
cd docker
.\up.ps1
cd ..
cd ..

open \apps\auth-server\CoMed.AuthServer.sln in visual studio
add CoMedClaimsPrincipalContributor.cs file. (path: apps\auth-server\src\CoMed.AuthServer\CoMedClaimsPrincipalContributor.cs)

return to console

dotnet restore
dotnet build /graphBuild

.\run-tye.ps1

open browser browse https://localhost:44307 see afterLeptonXInitialization error still exists in v6.1 login with default credentials go to openid/applications tab create new application: clientid: demo displayname: Demo password: 123456 type: confidential client allow password flow allow client credentials flow allow refresh token flow give access to all scopes save the app close the browser stop the tye. ctrl+c reopen CoMed.AuthServer.sln project run project with CoMed.AuthServer profile. Place break point on CoMedClaimsPrincipalContributor/ContributeAsync method. Open postman ui. 1 - test with password flow:

var client = new RestClient("https://localhost:44322/connect/token");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
request.AddParameter("client_id", "demo");
request.AddParameter("client_secret", "123456");
request.AddParameter("grant_type", "password");
request.AddParameter("username", "admin");
request.AddParameter("password", "1q2w3E*");
request.AddParameter("scope", "offline_access");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

see break-point hits three times.

2 - copy the refresh_token value, use in your own test. test with refresh_token flow and see break point does not hit.

var client = new RestClient("https://localhost:44322/connect/token");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
request.AddParameter("refresh_token", "eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZDQkMtSFM1MTIiLCJraWQiOiIxNzQ5Njc3QzkwRjU1MDUyNTYwNDc0QUM4RDhGMjk2QTA2NkI4RDNCIiwidHlwIjoib2lfcmVmdCtqd3QifQ.joQFH7tLYdrHK1_g5B0p3i8Xvq-kivcQX7wtPwtHRMmxnfD_1csi1ik7GwpqWPfKKdC1X4NvXvBBw0PqgUmn11VsxJe8l8_PFZa9_p1M7OWKkbuKkkpU58Bb-cuw7VV-_lzeqKF4xqugK3Aeko5HAvESqwHoWARaw0BX1xnooue5D8lT-wtxeqbN9qY3kwFXnaIltosTQ6QqAQeGQ2Ft4NUd5QRI3hsv74LA3kDf2biJDtGxKmM-8JvA9ouA0trGg0EzS9b2vXuHDL4uFmWDrcMj9oLMgmcnXSO88d04gn--eU65VtDa_lu7ZYCiwPtJ5eX2BqVbdWl-YX9FSxsz5Q.WrtU66BNpifWT7RO3Aq-qA.kWx0LOOQmNmOHKJF79J_8eBzNytPr4pAR8AULxBHFRUAa4DkTVCKuxMbadF_lo9-Pw7Wr0cqKLvMl5DEh80J5Y726aO4qJRpBZQnkdLO_lKyfqKFohc86r9Cu0GWVfgJUvRd7e12_gJD7cWLZYN_wsfB1XQtGp-HnmzarJnECcAKUE4l__Ri_0cxQInoZhsdN27quYj3Qy-DiAoL6I3kmtjUalv3Qr00g8mPdnho3Ej3l-riu8ZvjNQokv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kyJ6WkxVKuXRaIq1iGlR977WCqLA5WHw9j3MYPxkpB255KaQk3SDHke1KASduX5NbEfj3N9ttDOGB-cTGzRuItgI0vG8-hlRrC0xOP2g7sL6SElRAwWtiD3uxURFAJOt6TK12TAQ_RlNLWhvve-TVpbIqJkE4XdAJYHxaGegCbg07_iBvXX8qGByr1KLDaueAH0D2Zs-JkCbawJHa7lTAddkLRO19AdtGczRb-8vQhpFvPP3i526MBrY23pMeeRUasgbP4Tda1bTetbN7gNbVUm-icesy2gL9KPlJJQ0jnrA_miE3Vt89RQnevv5SVJgtNrXZlOASqHSLWozpj3E7sPAXDUH-jTi6KH71GgqG5GzwRenH5AN8Y2VdXllY24uzXt6tf_6x-recZGHY8AbQoP5DLhS9hSmfrCVAFPhfdhGuK77aiNPJMLPGLFSgnmu84BhXd7j5Qv0YhOH4FTm7cAlAxJGVatcg9wP_wu1HMdmPMWJ7q38aRlUawaGBeRzdQHnzq5UvlOcK1LboxbJe4-sulXSnxaiPXM2ZdbSY0l3ZkmNZrC5snhAsnGSUaF_soLRRBaDthtVza8q97Jqpi4y97vKRM_UwZubbaWv5VLF3K358BBabM9nz7qiUdR0B4Ib00UTrUIUY9Kjs7TWftPAAR7CdbKxo96hCf8rXMo7aXAOzG6t2t7a0IujucKK2i4wpYJZlj1-8xcFcu1vcvxXrGdLHXxlQU39Tgmus5OpHLkZY4hbLvsUpjV7jy4Cf_n7WGMR910fCtiZCfhPN9bvZ7oklh-HeAv34mvb94kfjjilHDqrbk.jC3WoYCk0LGa9NzsuVvE1GC0mv65plGJk-1swnm17iQ");
request.AddParameter("client_id", "demo");
request.AddParameter("client_secret", "123456");
request.AddParameter("grant_type", "refresh_token");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Answer

Bu there is a problem. I insist that IAbpClaimsPrincipalContributor is nothing to do with refresh_token flow. Is there anyone else can confirm me? Please do not answer if you have only assumptions but not tested for yourself.

Answer

Nope, I will not supply any further information. I am sick of endless questions.The issues is so clear, I asked you where the DefaultTokenService is gone, you said there is an alternative. I said alternative is not acting same when the flow is refresh_token. This is the summary and enough to see what is going on. If you have something to say, this information is enough. I am not your beta tester. I am tired of this buggy abp version. It already took 15 days to migrate. I am on live, stressed enough and I dont accept any meaningless questions anymore. If you are not able to give me a proper answer, please dont pretend to do so. This version of abp sucksssssss.. It is 5 times slower than before.. If you have nothing to say, close the ticket.

Answer

I created a micro service pro project Run the solution Added a demo client with client_credentials and refresh_token options available.

Folowed the steps in the document; https://docs.abp.io/en/abp/latest/Authorization#claims-principal-factory

Added a ClaimsPrincipalContributor file to authserver project

Called the token endpoint using client_credentials flow. I successfully interrupted the flow and breakpoint on ContributeAsync method hit. I called the token endpoint using refresh_token flow. The ContributeAsync is not visited.

So the ContributeAsync method is only visited on client_credentials flow. On IS4 version, I created DefaultTokenService class and this class is visited on both flows.

Answer

I just tested the refresh_token flow. Suggested solution does not suitable for refresh_tokens. The solutions is fine for password flow. IdentityServer4's DefaultTokenService was working as expected. I need to alter/add claims to token even in the refresh_token flow.

Showing 31 to 40 of 59 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13