Activities of "yunusemrecaglar"

Hi, I can perform the actions highlighted in green. What I want to do is what's marked in red. I cannot perform the action marked in red. With this code: 'await HttpClientAuthenticator.Authenticate(new RemoteServiceHttpClientAuthenticateContext(client, requestMessage, new RemoteServiceConfiguration(baseUrl), string.Empty));' I can make a request from Project B's frontend to the API in Project A. However, I cannot use this code in Project B's API, so I cannot obtain the token. Therefore, when I go from Project B's API to Project A's API, it returns a 401 error. How can I obtain the token of a user who has logged in to Project B's API? If I obtain the token, I can make requests to Project A's API using that token.

Hi, Both projects are monolithic projects, how can I make them work with a single token?

  • ABP Framework version: v7.2.2
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

https://support.abp.io/QA/Questions/5792/Token-Create Hello,

In the previous link, I asked how to make requests from Project A's frontend to Project B's API through a shared authentication server. Now, I'd like to know how to make requests from the backend of Project A to the backend of Project B.

Answer

It worked, thank you!

Answer

How can I request it? I need Project A's token. How can I obtain the token created for Project A? I need to obtain Project A's token within Project B's application.

Answer

Indeed, when I do it this way, it acquires the token. I log in from Project B's Blazor application using Project A's auth server. However, when I call the endpoint in Project A's backend from Project B's Blazor application, it returns a 401 error.

Answer

I'll explain the entire structure then. I created project A as a monolith, with the backend part running on localhost:44589. The auth server is on localhost:44879. Project B is also a monolith, with the frontend on localhost:44223 and the backend on localhost:44558. In project B, I've set the 'AuthServer:Authority' to the IP of project A's auth server (localhost:44879), and this part is working. The issue arises when I try to access an endpoint at localhost:44589 from localhost:44223, resulting in a 401 error. I'm using project B's token as the token. I want to obtain project A's token on project B's frontend so that I can make requests to the endpoint at localhost:44589.

Answer

Project B is a monolithic project. It is entirely different from project A, but they share a common auth server and both obtain their permissions from the same auth server. How can I singularize the token? In the OAuth 2.0 tables, there are rows for both project A and project B. Should I merge these rows?

Answer

The token of project B.

eyJhbGciOiJSUzI1NiIsImtpZCI6IjZDMzYwQjU1MUI2MjA4ODU4QjI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2ZXJUaWVyZWRfTG9jYWwiLCJvaV90a25faWQiOiIwOTBmZGJkZC1jYzJlLWFmMWQtOWE5My0zYTBkYjEzYWNmMjQiLCJhdWQiOiJQYnlzIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSByb2xlcyBlbWFpbCBwaG9uZSBQYnlzIiwianRpIjoiNDA1OWUzZWEtMGVjMS00ZWMzLThhMjItMzA3NWJmYzYzNTMwIiwiZXhwIjoxNjk0ODg5MjA3LCJpYXQiOjE2OTQ4ODU2MDd9.uvw9izA8gfQ3lv2Nn3qxRyX3EHqHlg2_0hZ7fETztMWuVfd3-XrIv_nIA_jCuXmB4L3lUsONSYInDbSXGCWrfx-m03lwGmWyIJJIJHhrs8OSyK0k7OjoZxeHtCd1amA5g5TgotP_qtsR_W1Y3DvKRxTGMK7RCwnncSAMLyFEXgZIhxTXykW7936Zgkz2ADcRhhvIQgYcUROC0wcsmY2OxnBYq0BAQvoI1lzwI3rW8AHsuDDTzoBjlKCwyE7GBxotgF8sYvxNlGdKdFc3jC5kYQuIEFD0oqB1sX7fmGQ3aDHDcp02PMxqI3QciZZrxzqfXg0iY0YNfFcUncGyzML2qg

Answer

Yes, they are performing identity verification from the same place. That part is working. When I try to access the endpoint from project B to project A, it gives a 401 error.

Showing 41 to 50 of 78 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 20, 2024, 05:21