1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-24 22:06:14 +01:00

Rename OscHTTPBasicAuthHandler to OscHTTPAuthHandler

We'll support more than one auth scheme in the future.
This commit is contained in:
mls 2022-04-26 12:50:05 +02:00 committed by Michael Schroeder
parent 38e3c4952f
commit 119ffd6027
No known key found for this signature in database
GPG Key ID: 6AEFFADDED5BE4F9

View File

@ -507,7 +507,7 @@ def _build_opener(apiurl):
from osc.core import __version__
global config
class OscHTTPBasicAuthHandler(HTTPBasicAuthHandler, object):
class OscHTTPAuthHandler(HTTPBasicAuthHandler, object):
# python2: inherit from object in order to make it a new-style class
# (HTTPBasicAuthHandler is not a new-style class)
def _rewind_request(self, req):
@ -548,7 +548,7 @@ def _build_opener(apiurl):
options = config['api_host_options'][apiurl]
# with None as first argument, it will always use this username/password
# combination for urls for which arg2 (apisrv) is a super-url
authhandler = OscHTTPBasicAuthHandler( \
authhandler = OscHTTPAuthHandler( \
HTTPPasswordMgrWithDefaultRealm())
authhandler.add_password(None, apiurl, options['user'], options['pass'])