[Chromoting] Add support for getUserInfo.
commit3394d1fd7b7718802e9911e43b826e14d9edb771
authorgarykac <garykac@chromium.org>
Tue, 11 Nov 2014 18:51:42 +0000 (11 10:51 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 11 Nov 2014 18:51:59 +0000 (11 18:51 +0000)
tree10dd585f6386285fece78679a779b0adca28b7e8
parent2c8b61a4db617427448947ff740ba002da1a9644
[Chromoting] Add support for getUserInfo.

getUserInfo is similar to getEmail except that it gets the user's name
in addition to email address. Since it requires a separate Google API
permission, there are separate getUserInfo vs. getEmail apis rather than
always getting (and requiring permission for) both.

The new getUserInfo apis are not currently used in CRD.

This also adds remoting.Identity.callWithNewToken, which is similar to
callWithToken except that it always uses a fresh token.

BUG=

Review URL: https://codereview.chromium.org/714433003

Cr-Commit-Position: refs/heads/master@{#303680}
remoting/webapp/crd/js/identity.js
remoting/webapp/crd/js/oauth2.js
remoting/webapp/crd/js/oauth2_api.js