Skip to content

Add support for Basic (Base64) authentication

As discussed in slack:

Stephen Bailey (Immuta) Aug 2nd at 3:03 PM

Would it be of interest to add BasicAuthenticator to the SDK? I have had to do this base64 approach a couple times now, and it took me a bit to figure it out the first time:

raw_credentials = f"{stream.config['username']}:{stream.config['password']}"
auth_token = base64.b64encode(raw_credentials.encode()).decode("ascii")
auth_headers = {"Authorization": f"Basic {auth_token}"}

Douwe Maan 9 days ago

I could’ve sworn there was one already! That’s definitely one we should support out of the box A contribution would be greatly appreciated 🙂

Derek Visch 9 days ago I've done it twice as well! +1