Hi, I created a winform project that used .net framework 4.7 version. I can't update .net core version because my customer used old windows version. I has to have both XXXX.Application.Contracts.dll and XXXX.HttpApi.Client.dll reference on this project.But it doesn't work. Any idea? Are there any relevant samples? Thank you.
6 Answer(s)
-
0
Hi BennieMok,
See https://github.com/abpframework/abp/pull/2867. You can change
HttpApi.Client
project target to netstandard2.0. -
0
I created an internal issue for this, will be available in the next version.
-
0
Ok,Thanks.
-
0
Hi liangshiwei , I made a action like this
var configuration = new IdentityClientConfiguration( "https://localhost:44338/", "EasyCrm", "EasyCrm_App", "1q2w3e*", "password", userName, password ); var accessToken = await AuthenticationService.GetAccessTokenAsync(configuration);
And then I try to login as a tenant user, but it always returns:invalid_username_or_password.Only host user can login. I just hope to login as a tennat user(by a token).could you please give me some more detailed tips?
-
0
Try:
var client = new HttpClient(); var disco = await client.GetDiscoveryDocumentAsync(_configuration["IdentityClients:Default:Authority"]); if (disco.IsError) { Console.WriteLine(disco.Error); return; } client.DefaultRequestHeaders.Add(TenantResolverConsts.DefaultTenantKey,<tenant>); // 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"] });
-
0
Ok,But It seems not a good idea.I suggest you add the new property 'tenantId' in the class named IdentityClientConfiguration.Thanks.