Extract authentication options handling into a separate function.

It is done in preparation for switching to OAuth2 as default (and only)
authentication method. Having all auth options handled by the same code makes it
easier to gradually add OAuth2 support.

As part of this, some options that would no longer work with OAuth2 (and that
are not being used from anywhere now, as far as I can tell) are removed:
  * Passing account password for authentication via command line.
  * Overriding 'Host' header when making requests to Rietveld (won't work with
    SSL anyway).
  * --account_type option (seems to be ClientLogin specific).

R=maruel@chromium.org
BUG=356813

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294746 0039d316-1c4b-4281-b951-d872f2087c98
15 files changed
tree: 3d49a17bb2b5ce9ad0d0020d7255e0d41a58623a
  1. bootstrap/
  2. git-templates/
  3. git_utils/
  4. man/
  5. recipes/
  6. support/
  7. testing_support/
  8. tests/
  9. third_party/
  10. win_toolchain/
  11. zsh-goodies/
  12. .gitignore
  13. annotated_gclient.py
  14. apply_issue
  15. apply_issue.bat
  16. apply_issue.py
  17. auth.py
  18. breakpad.py
  19. checkout.py
  20. chrome-update-create-task.bat
  21. chrome-update.bat
  22. chrome-update.py
  23. clang-format
  24. clang-format.bat
  25. clang_format.py
  26. codereview.settings
  27. commit_queue.py
  28. cpplint.bat
  29. cpplint.py
  30. cpplint_chromium.py
  31. create-chromium-git-src
  32. create-ntfs-junction.c
  33. create-ntfs-junction.exe
  34. dart_format.py
  35. download_from_google_storage
  36. download_from_google_storage.bat
  37. download_from_google_storage.py
  38. drover
  39. drover.bat
  40. drover.py
  41. fetch
  42. fetch.bat
  43. fetch.py
  44. fix_encoding.py
  45. gcl
  46. gcl.bat
  47. gcl.py
  48. gclient
  49. gclient-new-workdir.py
  50. gclient.bat
  51. gclient.py
  52. gclient_completion.sh
  53. gclient_scm.py
  54. gclient_utils.py
  55. gerrit_util.py
  56. git-auto-svn
  57. git-cache
  58. git-cherry-pick-upload
  59. git-cl
  60. git-cl-upload-hook
  61. git-crrev-parse
  62. git-crsync
  63. git-crup
  64. git-footers
  65. git-freeze
  66. git-gs
  67. git-lkgr
  68. git-map
  69. git-map-branches
  70. git-mark-merge-base
  71. git-nav-downstream
  72. git-nav-upstream
  73. git-new-branch
  74. git-number
  75. git-rebase-update
  76. git-rename-branch
  77. git-reparent-branch
  78. git-retry
  79. git-runhooks
  80. git-squash-branch
  81. git-thaw
  82. git-try
  83. git-upstream-diff
  84. git_auto_svn.py
  85. git_cache.py
  86. git_cherry_pick_upload.py
  87. git_cl.py
  88. git_common.py
  89. git_footers.py
  90. git_freezer.py
  91. git_map.py
  92. git_map_branches.py
  93. git_mark_merge_base.py
  94. git_nav_downstream.py
  95. git_new_branch.py
  96. git_number.py
  97. git_rebase_update.py
  98. git_rename_branch.py
  99. git_reparent_branch.py
  100. git_retry.py
  101. git_squash_branch.py
  102. git_try.py
  103. git_upstream_diff.py
  104. gn
  105. gn.bat
  106. gn.py
  107. gsutil.py
  108. hammer
  109. hammer.bat
  110. LICENSE
  111. my_activity.py
  112. my_reviews.py
  113. ninja
  114. ninja-linux32
  115. ninja-linux64
  116. ninja-mac
  117. ninja.exe
  118. oauth2.py
  119. OWNERS
  120. owners.py
  121. owners_finder.py
  122. patch.py
  123. PRESUBMIT.py
  124. presubmit_canned_checks.py
  125. presubmit_support.py
  126. profile.xml
  127. pylint
  128. pylint.py
  129. pylintrc
  130. python_git_runner.sh
  131. README
  132. README.codereview
  133. README.gclient
  134. README.git-cl
  135. README.testing
  136. repo
  137. rietveld.py
  138. roll-dep
  139. roll-dep.bat
  140. roll_dep.py
  141. scm.py
  142. subcommand.py
  143. subprocess2.py
  144. trychange.py
  145. update_depot_tools
  146. update_depot_tools.bat
  147. upload_to_google_storage.py
  148. WATCHLISTS
  149. watchlists.py
  150. weekly
  151. wtf