Closed forikal-uk closed 5 years ago
ghseet-to-xml
GoogleClientFactory
into the libraryThe old ghseet-to-xml
GoogleClientFactory
was in an old incarnation of ghseet-to-xml
when it used Service key instead of OAuth.
I still have old custom command that was based on that.
By bringing in a GoogleClientFactory
we now have a place to put code that decides how to create the GoogleAPIClient
.
If anyone is going to take up this task. Then you can see the old incarnation of gsheet-to-xml where we changed from using a Google API Service Key to using Google API OAuth.
See the commit where we switched to OAuth (user login as opposed to application login) https://github.com/xmlsquad/gsheet-to-xml/commit/268d2e738160958d6cbd80c8ef38d8d42c4a4fe9
At some stage we want to be able to use either type of authentication in our suite of tools so that code can be re-used behind a web interface.
When both 'servicekeyfiel' and 'OAuth credentials and token file name' are passed in.
It uses the $preferServiceKey property on the command class to decide which authentication mechanism to use.
Goal
See issue summary
Why
I have some custom code which uses Service type authentication and would like to re-use alot of code that expects OAuth to be used.
How
Bring in the code that expects Service type authentication into the
xml-authoring-libary
and squeeze it into theGoogleAPIClient
somehow.