File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -9,17 +9,14 @@ class MongoAuthProcess {
99 this . port = port ;
1010
1111 // Set up service name
12- serviceName = serviceName || options . gssapiServiceName || 'mongodb' ;
12+ this . serviceName = serviceName || options . gssapiServiceName || 'mongodb' ;
1313
1414 // Options
1515 this . canonicalizeHostName =
1616 typeof options . gssapiCanonicalizeHostName === 'boolean'
1717 ? options . gssapiCanonicalizeHostName
1818 : false ;
1919
20- this . service =
21- process . platform === 'win32' ? `${ serviceName } /${ host } ` : `${ serviceName } @${ host } ` ;
22-
2320 // Set up first transition
2421 this . _transition = firstTransition ( this ) ;
2522
@@ -58,7 +55,12 @@ class MongoAuthProcess {
5855 Object . assign ( initOptions , { user : username , password } ) ;
5956 }
6057
61- kerberos . initializeClient ( self . service , initOptions , ( err , client ) => {
58+ const service =
59+ process . platform === 'win32'
60+ ? `${ this . serviceName } /${ this . host } `
61+ : `${ this . serviceName } @${ this . host } ` ;
62+
63+ kerberos . initializeClient ( service , initOptions , ( err , client ) => {
6264 if ( err ) return callback ( err , null ) ;
6365
6466 self . client = client ;
You can’t perform that action at this time.
0 commit comments