Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Update XOAUTH2 support to work with Google's newer .json files #68
When creating a service account, Google has switched to providing
This adds support to read one of these .json files instead of the
This is more convenient, but also avoids confusion around the
Also avoids calling openssl.
Also added support for spaces in the filename for the .p12 files.
So now you would just use this:
--password1 'Gmail Migration-02305af9c080.json'
Instead of this:
Makes --authmechX accept "XOAUTH2", which then uses the password for parameters. --passwordX needs to be in the following format: "<service account>;<keyfile location>;<keyfile password>" <service account> is the name of the Google Developer API service account. <keyfile location> is the location of the keyfile associated with it. <keyfile password> is the password to access the keyfile. Entering this password is optional--it will assume "notasecret" if not provided, which is the default password Google uses with the keyfiles. Example arguments for using XOAUTH might look like this: --authmech1 xoauth2 --password1 'email@example.com;some_keyfile.p12' This assumes "some_keyfile" is in the current directory, and uses the default "notasecret" password.
When creating a service account, Google has switched to providing a .json file with the private key, oauth client id, and other data instead of an encrypted .p12 file with the just the private key. This adds support to read one of these .json files instead of the .p12 format. .p12 files are still supported, and which format is read is determined by the formatting of the argument. This is more convenient, but also avoids confusion around the oauth client ids. Previously, the client id matches the service account name Google generated. Now they are different, but this fact isn't terribly apparent from their management interface. Also added support for spaces in the filename for the .p12 files.
Very good, I'm going to integrate that upstream!
Le 27/05/2016 à 23:44, Secretions a écrit :
Au revoir, 09 51 84 42 42