File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -84,12 +84,13 @@ export default class DBSQLClient extends EventEmitter implements IDBSQLClient {
8484 * Connects DBSQLClient to endpoint
8585 * @public
8686 * @param options - host, path, and token are required
87+ * @param authProvider - Optional custom authentication provider
8788 * @returns Session object that can be used to execute statements
8889 * @example
8990 * const session = client.connect({host, path, token});
9091 */
91- async connect ( options : ConnectionOptions ) : Promise < IDBSQLClient > {
92- this . authProvider = new PlainHttpAuthentication ( {
92+ async connect ( options : ConnectionOptions , authProvider ?: IAuthentication ) : Promise < IDBSQLClient > {
93+ this . authProvider = authProvider || new PlainHttpAuthentication ( {
9394 username : 'token' ,
9495 password : options . token ,
9596 headers : {
You can’t perform that action at this time.
0 commit comments