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

Unified Diff: third_party/gsutil/oauth2_plugin/oauth2_plugin.py

Issue 2280023003: depot_tools: Remove third_party/gsutil (Closed)
Patch Set: Created 4 years, 4 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 | « third_party/gsutil/oauth2_plugin/oauth2_helper.py ('k') | third_party/gsutil/pkg_util.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/gsutil/oauth2_plugin/oauth2_plugin.py
diff --git a/third_party/gsutil/oauth2_plugin/oauth2_plugin.py b/third_party/gsutil/oauth2_plugin/oauth2_plugin.py
deleted file mode 100644
index 83fe40a718b88a59b3e6fab75475ca166eeb9156..0000000000000000000000000000000000000000
--- a/third_party/gsutil/oauth2_plugin/oauth2_plugin.py
+++ /dev/null
@@ -1,24 +0,0 @@
-from boto.auth_handler import AuthHandler
-from boto.auth_handler import NotReadyToAuthenticate
-import oauth2_client
-import oauth2_helper
-
-class OAuth2Auth(AuthHandler):
-
- capability = ['google-oauth2', 's3']
-
- def __init__(self, path, config, provider):
- if (provider.name == 'google'
- and config.has_option('Credentials', 'gs_oauth2_refresh_token')):
-
- self.oauth2_client = oauth2_helper.OAuth2ClientFromBotoConfig(config)
-
- self.refresh_token = oauth2_client.RefreshToken(
- self.oauth2_client,
- config.get('Credentials', 'gs_oauth2_refresh_token'))
- else:
- raise NotReadyToAuthenticate()
-
- def add_auth(self, http_request):
- http_request.headers['Authorization'] = \
- self.refresh_token.GetAuthorizationHeader()
« no previous file with comments | « third_party/gsutil/oauth2_plugin/oauth2_helper.py ('k') | third_party/gsutil/pkg_util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698