File tree 1 file changed +3
-2
lines changed
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 {
84
84
* Connects DBSQLClient to endpoint
85
85
* @public
86
86
* @param options - host, path, and token are required
87
+ * @param authProvider - Optional custom authentication provider
87
88
* @returns Session object that can be used to execute statements
88
89
* @example
89
90
* const session = client.connect({host, path, token});
90
91
*/
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 ( {
93
94
username : 'token' ,
94
95
password : options . token ,
95
96
headers : {
You can’t perform that action at this time.
0 commit comments