Activities of "lan.dang"

Thank you I can get it work, but what is different about name? If I put second as default, it works (as image below) But if i put second with "CustomJWT" it does not work, and return 302 Found error. Does it take only default Bearer?

I keep this and add new one this

But it does not work, give same problem

But when I add my custom JWT bear, it gives error so I think I can only use this default or custom JWT, is that right? Autofac.Core.DependencyResolutionException: An exception was thrown while activating λ:Microsoft.Extensions.Hosting.IHostedService[] -> Microsoft.AspNetCore.Hosting.GenericWebHostService -> Microsoft.AspNetCore.Server.IIS.Core.IISHttpServer -> Microsoft.AspNetCore.Authentication.AuthenticationSchemeProvider. ---> Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Microsoft.Extensions.Options.IOptions1[Microsoft.AspNetCore.Authentication.AuthenticationOptions])' on type 'AuthenticationSchemeProvider'. ---> System.InvalidOperationException: Scheme already exists: Bearer at Microsoft.AspNetCore.Authentication.AuthenticationOptions.AddScheme(String name, Action1 configureBuilder) at Microsoft.AspNetCore.Authentication.AuthenticationBuilder.<>c__DisplayClass4_0`2.

Hi Maliming again, I have a question related to JWT. I saw in our solution there is a configure of JWT already So that I can not add JWT bear configure (I have code to use Security key). In this case, how can I generate token to use for API? The token generated by using security key is not working

And now I got this error when send request from Chrome Plugin 2022-03-04 11:37:00.524 +07:00 [INF] Request starting HTTP/2 POST https://localhost:44307/API/Login application/json 37 2022-03-04 11:37:00.526 +07:00 [DBG] CORS request made for path: /API/Login from origin: chrome-extension://pjidmkdphpgkmfmengaddlpjojjpdifo but was ignored because path was not for an allowed IdentityServer CORS endpoint 2022-03-04 11:37:00.526 +07:00 [INF] No CORS policy found for the specified request. 2022-03-04 11:37:00.527 +07:00 [INF] Executing endpoint 'DruidAI.Blazor.Controllers.APIController.Login (DruidAI.Blazor)' 2022-03-04 11:37:00.527 +07:00 [INF] Route matched with {action = "Login", controller = "API", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Microsoft.AspNetCore.Mvc.ActionResult1[DruidAI.Blazor.Model.LoginRespone]] Login(DruidAI.Blazor.Model.LoginRequest) on controller DruidAI.Blazor.Controllers.APIController (DruidAI.Blazor). 2022-03-04 11:37:00.528 +07:00 [ERR] The required antiforgery header value "RequestVerificationToken" is not present. 2022-03-04 11:37:00.528 +07:00 [INF] Authorization failed for the request at filter 'Volo.Abp.AspNetCore.Mvc.AntiForgery.AbpAutoValidateAntiforgeryTokenAuthorizationFilter'. 2022-03-04 11:37:00.528 +07:00 [INF] Executing ObjectResult, writing value of type 'Microsoft.AspNetCore.Mvc.ProblemDetails'. 2022-03-04 11:37:00.528 +07:00 [INF] Executed action DruidAI.Blazor.Controllers.APIController.Login (DruidAI.Blazor) in 0.8391ms 2022-03-04 11:37:00.528 +07:00 [INF] Executed endpoint 'DruidAI.Blazor.Controllers.APIController.Login (DruidAI.Blazor)' 2022-03-04 11:37:00.533 +07:00 [DBG] Added 0 entity changes to the current audit log 2022-03-04 11:37:00.533 +07:00 [DBG] Added 0 entity changes to the current audit log 2022-03-04 11:37:00.533 +07:00 [DBG] Added 0 entity changes to the current audit log 2022-03-04 11:37:00.534 +07:00 [INF] Request finished HTTP/2 POST https://localhost:44307/API/Login application/json 37 - 400 - application/problem+json;+charset=utf-8 9.3609ms

It seems have this log 2022-03-04 10:18:11.395 +07:00 [INF] Request starting HTTP/1.1 POST https://localhost:44307/api/Values application/json 10 2022-03-04 10:18:11.397 +07:00 [INF] Identity.Application was not authenticated. Failure message: Unprotect ticket failed 2022-03-04 10:18:11.398 +07:00 [INF] Identity.Application was not authenticated. Failure message: Unprotect ticket failed 2022-03-04 10:18:11.398 +07:00 [INF] Identity.Application was not authenticated. Failure message: Unprotect ticket failed 2022-03-04 10:18:11.398 +07:00 [INF] Executing endpoint 'DruidAI.Blazor.Controllers.ValuesController.Post (DruidAI.Blazor)' 2022-03-04 10:18:11.399 +07:00 [INF] Route matched with {action = "Post", controller = "Values", area = "", page = ""}. Executing controller action with signature Void Post(System.String) on controller DruidAI.Blazor.Controllers.ValuesController (DruidAI.Blazor). 2022-03-04 10:18:11.402 +07:00 [ERR] The required antiforgery cookie ".AspNetCore.Antiforgery.qD9znlZol-M" is not present. 2022-03-04 10:18:11.402 +07:00 [INF] Authorization failed for the request at filter 'Volo.Abp.AspNetCore.Mvc.AntiForgery.AbpAutoValidateAntiforgeryTokenAuthorizationFilter'. 2022-03-04 10:18:11.404 +07:00 [INF] Executing ObjectResult, writing value of type 'Microsoft.AspNetCore.Mvc.ProblemDetails'. 2022-03-04 10:18:11.404 +07:00 [INF] Executed action DruidAI.Blazor.Controllers.ValuesController.Post (DruidAI.Blazor) in 5.0763ms 2022-03-04 10:18:11.404 +07:00 [INF] Executed endpoint 'DruidAI.Blazor.Controllers.ValuesController.Post (DruidAI.Blazor)' 2022-03-04 10:18:11.728 +07:00 [DBG] Added 0 entity changes to the current audit log 2022-03-04 10:18:11.730 +07:00 [DBG] Added 0 entity changes to the current audit log 2022-03-04 10:18:11.741 +07:00 [DBG] Added 0 entity changes to the current audit log 2022-03-04 10:18:11.744 +07:00 [INF] Request finished HTTP/1.1 POST https://localhost:44307/api/Values application/json 10 - 400 - application/problem+json;+charset=utf-8 348.5922ms

What does it mean?

Thank you

Yes that is what I need, can you send me these link to source code?

Thanks @maliming,

At server, what is interface or class that I need to use to verify user? I tried to use IdentityUserAppService but it does not work. Can you give a sample code to allow user login?

It is same for me, I would like to allow tenant register by select plan which should be created by host but this feature is just used for tenant only

Showing 11 to 20 of 36 entries
Made with ❤️ on ABP v9.1.0-rc.1. Updated on January 17, 2025, 14:13