Authentication is used in two different ways: on one hand, it is used as the metadata describing an endpoint,
telling the server that it should enforce a type of authentication on the endpoint. On the other hand, an
object of type Authentication is passed by the client representing the secret the client wants to use,
estuary-rpc-client encodes that Authentication, estuary-rpc-server decodes that Authentication, and that object
is then passed to a function that is passed through the ServerOpts to
createApiServer on the serverside.
Meaning basically that in the Metadata use case, the usernames/passwords/secrets need to have defined string values,
but nothing actually happens with those, you can leave them as an empty string - but on the serverside you
should define the authenticate function that takes in a populated Authentication object
Authentication is used in two different ways: on one hand, it is used as the metadata describing an endpoint, telling the server that it should enforce a type of authentication on the endpoint. On the other hand, an object of type Authentication is passed by the client representing the secret the client wants to use, estuary-rpc-client encodes that Authentication, estuary-rpc-server decodes that Authentication, and that object is then passed to a function that is passed through the ServerOpts to createApiServer on the serverside.
Meaning basically that in the Metadata use case, the usernames/passwords/secrets need to have defined string values, but nothing actually happens with those, you can leave them as an empty string - but on the serverside you should define the
authenticatefunction that takes in a populated Authentication object