Basic Authorization
from base64 import b64encode
# Authorization token is using base 64 to encode
def basic_auth(username, password):
token = b64encode(f"{username}:{password}".encode('utf-8')).decode("ascii")
return f'Basic {token}'
December 30, 2023Less than 1 minute