Open Closed

Service to Service communication #8012


User avatar
0
sgarad created
  • ABP Framework version: 8.2.1
  • UI Type: Angular
  • Database System: EF Core (MySQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes Hi There,

I've implemented microservice to microservice synchronous communication as stated here. The soulution works just fine. I'm able to get data from cross service but every time I hit the endpoint on other service I see a new token is generated and it is causing my OpenIddictTokens just keeps increasing. Can't the once generated token be re-used again for next service call? I see the token is generated with 1 hour of expiration but next service call(Same endpoint) does not consider existing token and generates the new token.

Thanks Krishna


3 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    The services are stateless; it will not store the token.

    Or you can consider to integration services https://abp.io/docs/latest/framework/api-development/integration-services

  • User Avatar
    0
    sgarad created

    Hi liangshiwei,

    Thanks for the quick reply. If I moved to Integration Service do I still need aa access_token while communication from service to service? When I followed intergration implemntation I gets UnAuthorized exception.

    Thanks Krishna

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi

    Integration services don't need acccess_token.

    Could you share your code?

Made with ❤️ on ABP v9.0.0-preview Updated on October 03, 2024, 12:03