Open Closed

Loging and accessing the Web API from another client #3411


User avatar
0
Leonardo.Willrich created

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:

  1. In the application service, the Current User is always Null.
  2. 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)
  3. I need to check the user permissions on the application side, how I can do that properly?
  4. 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.


No answer yet!
Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11