Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: remoting/webapp/crd/js/oauth2_api.js

Issue 1133913002: [Chromoting] Move shared webapp JS files from crd/js -> base/js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/webapp/crd/js/oauth2.js ('k') | remoting/webapp/crd/js/oauth2_api_impl.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview
7 * OAuth2 API flow implementations.
8 */
9
10 'use strict';
11
12 /** @suppress {duplicate} */
13 var remoting = remoting || {};
14
15 /** @interface */
16 remoting.OAuth2Api = function() {
17 };
18
19 /**
20 * Asynchronously retrieves a new access token from the server.
21 *
22 * @param {function(string, number): void} onDone Callback to invoke when
23 * the access token and expiration time are successfully fetched.
24 * @param {function(!remoting.Error):void} onError Callback invoked if an
25 * error occurs.
26 * @param {string} clientId OAuth2 client ID.
27 * @param {string} clientSecret OAuth2 client secret.
28 * @param {string} refreshToken OAuth2 refresh token to be redeemed.
29 * @return {void} Nothing.
30 */
31 remoting.OAuth2Api.prototype.refreshAccessToken = function(
32 onDone, onError, clientId, clientSecret, refreshToken) {
33 };
34
35 /**
36 * Asynchronously exchanges an authorization code for access and refresh tokens.
37 *
38 * @param {function(string, string, number): void} onDone Callback to
39 * invoke when the refresh token, access token and access token expiration
40 * time are successfully fetched.
41 * @param {function(!remoting.Error):void} onError Callback invoked if an
42 * error occurs.
43 * @param {string} clientId OAuth2 client ID.
44 * @param {string} clientSecret OAuth2 client secret.
45 * @param {string} code OAuth2 authorization code.
46 * @param {string} redirectUri Redirect URI used to obtain this code.
47 * @return {void} Nothing.
48 */
49 remoting.OAuth2Api.prototype.exchangeCodeForTokens = function(
50 onDone, onError, clientId, clientSecret, code, redirectUri) {
51 };
52
53 /**
54 * Get the user's email address.
55 *
56 * TODO(jamiewalch): Reorder these parameters to match the typical chrome API
57 * convention of having callbacks at the end and remove the token parameter
58 * to match remoting.HostListApi.
59 *
60 * @param {function(string):void} onDone Callback invoked when the email
61 * address is available.
62 * @param {function(!remoting.Error):void} onError Callback invoked if an
63 * error occurs.
64 * @param {string} token Access token.
65 * @return {void} Nothing.
66 */
67 remoting.OAuth2Api.prototype.getEmail = function(onDone, onError, token) {
68 };
69
70 /**
71 * Get the user's email address and full name.
72 *
73 * @param {function(string, string):void} onDone Callback invoked when the email
74 * address and full name are available.
75 * @param {function(!remoting.Error):void} onError Callback invoked if an
76 * error occurs.
77 * @param {string} token Access token.
78 * @return {void} Nothing.
79 */
80 remoting.OAuth2Api.prototype.getUserInfo = function(onDone, onError, token) {
81 };
OLDNEW
« no previous file with comments | « remoting/webapp/crd/js/oauth2.js ('k') | remoting/webapp/crd/js/oauth2_api_impl.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698