File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -9,17 +9,14 @@ class MongoAuthProcess {
9
9
this . port = port ;
10
10
11
11
// Set up service name
12
- serviceName = serviceName || options . gssapiServiceName || 'mongodb' ;
12
+ this . serviceName = serviceName || options . gssapiServiceName || 'mongodb' ;
13
13
14
14
// Options
15
15
this . canonicalizeHostName =
16
16
typeof options . gssapiCanonicalizeHostName === 'boolean'
17
17
? options . gssapiCanonicalizeHostName
18
18
: false ;
19
19
20
- this . service =
21
- process . platform === 'win32' ? `${ serviceName } /${ host } ` : `${ serviceName } @${ host } ` ;
22
-
23
20
// Set up first transition
24
21
this . _transition = firstTransition ( this ) ;
25
22
@@ -58,7 +55,12 @@ class MongoAuthProcess {
58
55
Object . assign ( initOptions , { user : username , password } ) ;
59
56
}
60
57
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 ) => {
62
64
if ( err ) return callback ( err , null ) ;
63
65
64
66
self . client = client ;
You can’t perform that action at this time.
0 commit comments