Hi. I need some help. I'm new to py and airbyte, I...
# help-connector-development
m
Hi. I need some help. I'm new to py and airbyte, I'm trying to create a custom connector with SDK. I'm working with an endpoin that the authentication process require one POST request with plain username and password and returns a json with a token. And on the next requests i need to add in header the field 'authorization: JWT {token}'. What is the best way to do this? Do I need to create new classes for this auth worflow?
k
A message from kapa.ai
New message text here
m
In the custom authenticator class, in order to make the POST request, do i use the requests library or is there any class in airbyte to make the post?
instantiate the custom authenticator with the required credentials and pass it to your stream" where should i add this?
m
do i use the requests library or is there any class in airbyte to make the post?
It’s python code so can use whatever you like. requests has a big community and is easy to use so it is a good pick.
instantiate the custom authenticator with the required credentials and pass it to your stream” where should i add this?
At some point in your code, you will have to instantiate the new Authenticator class you have created. At that point, you’ll have to provide the username/password to this class. Eventually, you might want to make it accessible through the spec like MSSQL does