We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb9500b commit 7f863ddCopy full SHA for 7f863dd
1 file changed
prometheus_client/handlers/basic_auth.py
@@ -6,8 +6,9 @@
6
7
def handler(url, method, timeout, headers, data, username = None, password = None):
8
def handle():
9
- '''Handler that implements HTTP Basic Auth by setting auth headers if
10
- 'username' and 'password' arguments are supplied and not None.'''
+ '''Handler that implements HTTP Basic Auth.
+ Sets auth headers using supplied 'username' and 'password', if set.
11
+ '''
12
if username is not None and password is not None:
13
auth_value = "{0}:{1}".format(username, password)
14
auth_header = "Basic {0}".format(base64.b64encode(bytes(auth_value)))
0 commit comments