It was part of a project that I abandoned.
My idea was to sell some "Cloud controls" and I started with Dropbox which was something I needed, but found that Dropbox had changed its API in the few months that I was developing the project, so I decided to leave it. They are worse than MS. I cannot sell a component that will work only until they decide to change the API.
I just took from that project only the part related to the autentication but there must be still much dead code left to delete.
The program needs to make the user to log-in to get the token once, then store the token locally to use it the next time.
There is a sample application that logs user on and retrieves tokens for the service.
Finally cGcpOAuth is a helper class for OAuth2 user authentication in Installed Application mode. It uses Google Accounts to validate user login and to acquire user consent on accessing GCP service. Then it retrieves OAuth2 refresh_token from accounts.google.com/o/oauth2/token service which can be stored and later used to retrieve OAuth access_token for GCP service without showing another login screen.
This code is pretty dated so might not work w/ current cloud print service at all.
There is a sample application that logs user on and retrieves tokens for the service.
This code is pretty dated so might not work w/ current cloud print service at all.
cheers,
</wqw>
I thought I would take another look at this, and I noticed that you have been working on it in the last few days. As of December 31, 2020, Google Cloud Print is no longer supported, and I noticed that some of the registry settings have been changed to reflect "Email".