Passing headers to Oauth2 provider from client in KrakenD

141 views
Skip to first unread message

Gnana Kumar K.

unread,
Apr 22, 2024, 2:44:34 AM4/22/24
to KrakenD Community
Hi All,
      I just started exploring KrakenD community edition. I need to pass header (key , value) from Client to Oauth token provider( token_url) using KrakenD, need to read passed header in Oauth service provider  . kindly let me know how to do this . share me same krakend.json for the same.

I am using "auth/client-credentials"  in "backend" -->"extra_config" section in krakend.json


Thank you.

Regards,
Gnana Kumar 

Albert Lombarte

unread,
Apr 22, 2024, 3:29:42 AM4/22/24
to KrakenD Community, gnan...@gmail.com
Hi Gnana,

If you want to pass headers from the client to the provider, you don't need to add any component, just input_headers. You have examples in this link:

If you want KrakenD to handle the authorization flow itself (regardless of what you do with the client), then use client credentials as you were pointing out.

You might need to add extra headers (like this example)

All aforementioned settings can work separately or together.



El dia dilluns, 22 d’abril del 2024 a les 8:44:34 UTC+2, gnan...@gmail.com va escriure:

Gnana Kumar K.

unread,
Apr 22, 2024, 3:58:47 AM4/22/24
to KrakenD Community, Albert Lombarte, gnan...@gmail.com

Hi Albert,
Thanks for reply. I need to pass header to oauth2 service provider/token generator api (ex :token_url)  not to normal provider/actual API.
in this case please help with sample krakend.json

Thanks & Regards,
Gnana Kumar K

kanipakam gnanakumar

unread,
Apr 24, 2024, 2:54:43 AM4/24/24
to KrakenD Community, Gnana Kumar K., Albert Lombarte
Hi All,

Kindly help me with  above issue.

Thanks,
Gnana Kumar K
Reply all
Reply to author
Forward
0 new messages