Starts in:
2 DAYS
5 HRS
11 MIN
3 SEC
Starts in:
2 D
5 H
11 M
3 S

Activities of "mgurer"

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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PlJJQ0jnrA_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.

Thanks

Is there any estimation for the release date?

Thanks, once more. You saved the day again.

DemoApplicationClient is created using blazor app UI and client_credentials,refresh_token,password flow options checked.

Showing 31 to 40 of 50 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06