My Question is suppose I've two API's (Two different microservices) and one batch service e.g. API_A :- Which is protected using spring security JWT. API_B :- Which will generate the JWT token to access API_A. SERVICE_C :- Which want to consume/produce the data using API_A.
so our workflow is like SERVICE_C will be invoked by the client and then it'll call API_B to fetch the JWT & Refresh token to access API_A.
So here I need to keep track of expiration time of JWT token and once it expired I need to call API_B again using refresh token to get the new JWT Token and for all this thing I am using Rest_template & Feign client.
My question is do n't we have any kind of code or functionality available in spring which keeps track of that expiration time by himself and refresh it automatically when it needed (using Oauth2 or anything)., because in Quarkus Framework I've seen this functionality is available using OIDC over there?
use token stores, such as an in-memory store or a JDBC-backed store. The token store can handle token persistence and retrieval.