This is class helps the user to authenticate..
#include <GCF3/IGDriveLiteAuthenticator>. More...
Public Member Functions | |
virtual QUrl | authenticationPageUrl () const =0 |
virtual GCF::Result | authenticateFromPageTitle (const QString &title, QObject *notifyObject=0, const char *notifySlot=0)=0 |
virtual GCF::Result | refreshAuthentication ()=0 |
Detailed Description
There will be only one instance of GCF::IGDriveLiteAuthenticator in GDrive component . You will have to set the client ID and client-secret inorder for authenticator to give proper url for authentication. For Details about client ID and other things please refer to GCF's GDriveLite component.
Once instantiated, you will need to authorize GCF::IGDriveLite to access the drive content and work with it. Read Authorising GDriveLite to access drive data for more details.
Access tokens are automatically refreshed, but you can trigger it manually using GCF::IGDriveLiteAuthenticator::refreshAuthentication() also.
Member Function Documentation
|
pure virtual |
Returns authentication Url which should be loaded into a web page and shown to user to enter his/her credentials.
- Returns
QUrl
which needs to be shown to the user for authentication.
|
pure virtual |
This method gets access token from the changed authentication url after user has authenticated.
- Parameters
-
title the changed url after user authentication which contains the success code. notifyObject object to notify once the access token is retrieved by authenticator. notifySlot slot to notify in the notifyObject once the access token retrieved by authenticator.
- Returns
- GCF::Result which contains success or failure based on whether sending request for access token was successful or not.
|
pure virtual |
Refreshes the access token. For refreshing authentication the user must have been authenticated at least once.
- Returns
- GCF::Result which contains success or failure based on whether sending request for refreshing was successful or not.