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

Unified Diff: remoting/webapp/oauth2_api.js

Issue 149863002: Don't revoke tokens on logout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/oauth2.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/oauth2_api.js
diff --git a/remoting/webapp/oauth2_api.js b/remoting/webapp/oauth2_api.js
index c028fad24c03bd9ff3ba93f833810efb3b489aeb..8c49efece6e6066c97017dff2995a3c5833b49fe 100644
--- a/remoting/webapp/oauth2_api.js
+++ b/remoting/webapp/oauth2_api.js
@@ -24,13 +24,6 @@ remoting.OAuth2Api.getOAuth2TokenEndpoint_ = function() {
};
/** @private
- * @return {string} OAuth token revocation URL.
- */
-remoting.OAuth2Api.getOAuth2RevokeTokenEndpoint_ = function() {
- return remoting.settings.OAUTH2_BASE_URL + '/revoke';
-};
-
-/** @private
* @return {string} OAuth2 userinfo API URL.
*/
remoting.OAuth2Api.getOAuth2ApiUserInfoEndpoint_ = function() {
@@ -190,30 +183,3 @@ remoting.OAuth2Api.getEmail = function(onDone, onError, token) {
remoting.xhr.get(remoting.OAuth2Api.getOAuth2ApiUserInfoEndpoint_(),
onResponse, '', headers);
};
-
-/**
- * Revokes a refresh or an access token.
- *
- * @param {function():void} onDone Callback invoked when the token is
- * revoked.
- * @param {function(remoting.Error):void} onError Callback invoked if an
- * error occurs.
- * @param {string} token An access or refresh token.
- * @return {void} Nothing.
- */
-remoting.OAuth2Api.revokeToken = function(onDone, onError, token) {
- /** @param {XMLHttpRequest} xhr */
- var onResponse = function(xhr) {
- if (xhr.status == 200) {
- onDone();
- } else {
- console.error('Failed to revoke token. Status: ' + xhr.status +
- ' response: ' + xhr.responseText);
- onError(remoting.OAuth2Api.interpretXhrStatus_(xhr.status));
- }
- };
-
- var parameters = { 'token': token };
- remoting.xhr.post(remoting.OAuth2Api.getOAuth2RevokeTokenEndpoint_(),
- onResponse, parameters);
-};
« no previous file with comments | « remoting/webapp/oauth2.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698