MDL-29857 - google apis: Convert to OAuth 2.0
authorDan Poltawski <dan@moodle.com>
Sun, 13 May 2012 16:42:24 +0000 (00:42 +0800)
committerDan Poltawski <dan@moodle.com>
Wed, 30 May 2012 16:00:25 +0000 (00:00 +0800)
commit4560fd1b669ad65149d8ca19fac9f4210358bd11
treef5e27bf12e9a30466484bdb24a346c779680701d
parent469fb5d6722678c68b3e8711b08d1271d3d8c411
MDL-29857 - google apis: Convert to OAuth 2.0

Updated the various plugins to use OAuth 2.0 for authentication
against google apis. Google are phasing out AuthSub and pushing OAuth as
the replacement.

This changes repository_googledocs, repository_picasa,
portfolio_googledocs and portfolio_picasa

The token for requests is now stored in session rather than a user
prefence and it persists less but doesn't bother the user more than
necessary.

The google docs portfolio plugin is converted to use resumable upload
API as this appears to be what Google have replaced this with.

Unfortunately unlike authsub OAuth will require some setup by admins,
this is linked as a docs page.
15 files changed:
lib/googleapi.php
portfolio/googledocs/lang/en/portfolio_googledocs.php
portfolio/googledocs/lib.php
portfolio/googledocs/version.php
portfolio/picasa/lang/en/portfolio_picasa.php
portfolio/picasa/lib.php
portfolio/picasa/version.php
repository/googledocs/db/upgrade.php [moved from portfolio/picasa/db/events.php with 58% similarity]
repository/googledocs/lang/en/repository_googledocs.php
repository/googledocs/lib.php
repository/googledocs/version.php
repository/picasa/db/upgrade.php [moved from portfolio/googledocs/db/events.php with 58% similarity]
repository/picasa/lang/en/repository_picasa.php
repository/picasa/lib.php
repository/picasa/version.php