Support for "bearer" authentication type in https client [solved]

RichPiano
Posts: 123
Joined: Mon May 18, 2020 2:51 pm

Support for "bearer" authentication type in https client [solved]

Postby RichPiano » Sat Sep 04, 2021 1:36 pm

As of right now, espressif only supports the two authentication modes "Basic" and "Digest" with no support for "Bearer":

https://docs.espressif.com/projects/esp ... entication

I would like to make use of the JWT token authentication using esp https client which would require that.

My question therefore is: Is there a plan in the near future to implement "bearer" type authentication on the esp https client? If not, can someone give a rought estimate on how extensive a custom implementation would be?
Last edited by RichPiano on Thu Sep 23, 2021 2:44 pm, edited 1 time in total.

User avatar
fasani
Posts: 195
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Re: Support for "bearer" authentication type in https client

Postby fasani » Sun Sep 05, 2021 4:32 pm

Hello,
Unless I'm missing something with the existing toolset in IDF you could handle this.
https://github.com/martinberlin/cale-id ... e.cpp#L411

Of course I don't know the internals of your particular OAuth but you could get a token and then pass it on every request as an authorization Bearer token.
I'm also quite sure there should be some example of this if you Google around.
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

RichPiano
Posts: 123
Joined: Mon May 18, 2020 2:51 pm

Re: Support for "bearer" authentication type in https client

Postby RichPiano » Tue Sep 21, 2021 7:40 pm

Thanks a lot! I just wanted to get back to you and say that it worked :)

User avatar
fasani
Posts: 195
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Re: Support for "bearer" authentication type in https client

Postby fasani » Tue Sep 21, 2021 8:28 pm

Awesome! You can edit the first entry and add [Solved] or similar so you help to identify the entries that are still not resolved.
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

Who is online

Users browsing this forum: Baidu [Spider], spenderIng and 161 guests