Files
inky-nextcloud/urequests/auth.py
2023-10-28 21:45:05 -04:00

11 lines
301 B
Python

# (c) 2021 Paul Sokolovsky, MIT license, https://github.com/pfalcon/pycopy-lib
import uwwwauth
class HTTPBasicAuth:
def __init__(self, user, passwd):
self.auth = uwwwauth.basic_resp(user, passwd)
def __call__(self, r):
r.headers["Authorization"] = self.auth
return r