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
⌛ This post has been reserved for your question.
Hey @lucifer7303! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./closeor theClose Postbutton 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.
💤 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.Can't you just add these fields in the HTTP request when sending it?
Why need an
RequestInterceptor?💤 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.