If you're creating a bug/problem report, please include followings:
- ABP Framework version: v5.3
- UI type: Blazor WASM
- DB provider: EF Core
Hi,
I'm building another Web Application in Blazor WebAssembly PWA that will just trigger some actions from my main web page application. It is not using ABP.IO framework, it is just a simple application.
To call methods from Web API, I know that I can request the Token using /access/token and using the Identity Server client details. Then, when calling the method using HttpClient, I have to add the "__tenant" and "Authorization" with "Bearer {access_token}" in the Header.
Questions:
- In the application service, the Current User is always Null.
- How can I use Dynamic API Clients using the module HttpApi.Client? Is there some example? (https://docs.abp.io/en/abp/latest/API/Dynamic-CSharp-API-Clients)
- I need to check the user permissions on the application side, how I can do that properly?
- In Post methods it is a return error related to AntiForgery ([15:57:46 ERR] The required antiforgery cookie ".AspNetCore.Antiforgery.VzbPRCldIbQ" is not present.). What is missing? Do you have an example of calling a Post method using Postman?
Kind regards,
Leonardo Willrich.
29 Answer(s)
-
0
Well done, it works like a charm!
-
0
👍👍👍
-
0
Maliming,
The CurrentUser.Name and Surname is still empty. I couldn't find HttpContext property. My application is using Services (.Application), I don't have a controller in the .Host application.
Following this post, https://github.com/abpframework/abp/issues/6571, I've added AbpClaimsTypes.Name and AbpClainmsTypes.Surname in the IdentityServerDataSeeder, it created the two new ApiResouceClaims records, but, didn't work. I've restarted all applications to see if it would be a cache issue, but, still not working.
Any idea what else I can do?
-
0
hi
Share a full project with me liming.ma@volosoft.com