Custom Method to get Token to be provided with OpenFeign proxy requests

So i was making an app which calls a third party API and it requires a auth token with it. I thoight itd be pretty easy to make a RequestInterceptor and make Spring Security do it for me But the endpoint which gives the token has 2 problems. It uses password grant type and it has 2 extra fields "username" and "password" required along eith client id and client secret The ClientRegistration class is final and has no way of making custom implementation So how do i handle getting this token and providing it to OpenFeign when it makes the call TLDR:Problem handling password grant type and added attributes to ClientRegistration, for a client implementaion
3 Replies
JavaBot
JavaBot5w ago
This post has been reserved for your question.
Hey @lucifer7303! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here. 💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
dan1st
dan1st5w ago
Can't you just add these fields in the HTTP request when sending it? Why need an RequestInterceptor?
JavaBot
JavaBot5w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Want results from more Discord servers?
Add your server