Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
5.9.2
-
None
Description
When programmer uses QOAuth2AuthorizationCodeFlow and runs grant() method, then he must handle signal authorizeWithBrowser(..) by running QUrl parameter in some web browser - the OAuth redirection is then handled by QOAuthHttpServerReplyHandler (local http server).
This approach is cute, but running some local http instance for catching OAuth redirection is not acceptable for everyone.
So my idea is: allow users to avoid QOAuthHttpServerReplyHandler completely and allow them to set "AUTH" code to OAuth flow manually.
Basically, I would like to have method QOAuth2AuthorizationCodeFlow::setAuthCode(const QString& authCode) which would look like this:
void QOAuth2AuthorizationCodeFlow::setAuthCode(const QString& authCode) {
setStatus(QAbstractOAuth::Status::TemporaryCredentialsReceived);
requestAccessToken(authCode);
}
This way, users of the library can use their own way for getting initial AUTH code - for example custom crafted WebEngine-based component and then just continue the workflow with it. Example of such a component can be seen for example here.