QT 5.15 OAuth2 with certificate flow
-
Hello, I am a total beginner with OAuth2 communication and has gotten an assignment to use Oauth2 with certificate flow to send some json data to a recipient. I have done some reading but I am still not sure where to start.
Maybe my immediate question is if I have all I need to create the certificate, within the QT framework, version 5.15.8 specifically? I tried to see if I could modify the reddit client example to use certification but I was not able to find a way to add a certificate through the functions that were used in that example: https://code.qt.io/cgit/qt/qtnetworkauth.git/tree/examples/oauth/redditclient?h=5.15
Having looked around, it seems I need to create a "json web token" for the client certificate to be encoded into and QT seems to be lacking such a tool?
If there is anyone who has worked with OAuth2 with certification flow in QT and can give some pointers, I would greatly appreciate the help!
-
Hi and welcome to devnet,
Are you referring to the client credentials flow ?
In any case, do you have an application somewhere that will handle the authentication part ?
-
Hi and welcome to devnet,
Are you referring to the client credentials flow ?
In any case, do you have an application somewhere that will handle the authentication part ?
@SGaist Hi, sorry for the very late response! I got a little further with my project but I just opened a new thread for the next step I am stuck on...
I am still not entirely sure if I am on the right track, but I got a python example to follow from the people who manage the server, which I could replicate pretty decently using the QT framwork.
Based on the example I got, I need to use importpkcs12 to extract a private key which I can use to... go further in the process of sending the package. I immediately got stuck on that part which is what my new thread is about, where QSslCertificate::importPkcs12(...) returns false despite the seemingly correct inputs. I think I can close this particular thread for now.
-