lundi 2 décembre 2019

QOAuth for authenticating a user ( login )

i have a use case in which the user logs in to the desktop aapln and connects to the server. the server returns a token which gets used for further requests and gets refreshed as required.

For this i am trying to authenticate the user using QoAuth. Currently i am using the post method of QOAuth for sending the token request to the server and connecting its reply to a slot.

I have some queries regarding this

  1. The post method expects QUrl & QVariantMap. What needs to be filled in this map? Is it the usrname password etc? and the URL should be the one which is used to get the token right?

  2. How to handle response in this case? Can I just connect finished signal to some xyz() slot and handle there?

Kindly answer above questions.

I am new to this concept, hence finding it bit difficult to grasp it. It would be of great help if anybody can provide a minimal example of using oAuth for login/authentication.

Thanks

Aucun commentaire:

Enregistrer un commentaire