singer_sdk.authenticators.BasicAuthenticator

class singer_sdk.authenticators.BasicAuthenticator(stream: singer_sdk.streams.core.Stream, username: str, password: str)

Implements basic authentication for REST Streams.

This Authenticator implements basic authentication by concatinating a username and password then base64 encoding the string. The resulting token will be merged with any HTTP headers specified on the stream.

classmethod create_for_stream(stream: singer_sdk.streams.core.Stream, username: str, password: str)singer_sdk.authenticators.BasicAuthenticator

Create an Authenticator object specific to the Stream class.

Parameters
  • stream – The stream instance to use with this authenticator.

  • username – API username.

  • password – API password.

Returns

A new singer_sdk.authenticators.BasicAuthenticator instance.