singer_sdk.authenticators.BearerTokenAuthenticator#

class singer_sdk.authenticators.BearerTokenAuthenticator#

Implements bearer token authentication for REST Streams.

This Authenticator implements Bearer Token authentication. The token is a text string, included in the request header and prefixed with ‘Bearer ‘. The token will be merged with HTTP headers on the stream.

__init__(stream: Stream, token: str) None#

Create a new authenticator.

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

  • token – Authentication token.

classmethod create_for_stream(stream: RESTStreamBase, token: str) BearerTokenAuthenticator#

Create an Authenticator object specific to the Stream class.

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

  • token – Authentication token.

Returns:

A new

singer_sdk.authenticators.BearerTokenAuthenticator instance.

Return type:

BearerTokenAuthenticator