@@ -11,7 +11,7 @@ const realm = process.env.KERBEROS_REALM;
1111const hostname = process . env . KERBEROS_HOSTNAME ;
1212const username = `${ process . env . KERBEROS_USERNAME } @${ realm } ` ;
1313const service = `mongodb/${ hostname } ` ;
14- const port = process . env . KERBEROS_POR || '27017' ;
14+ const port = process . env . KERBEROS_PORT || '27017' ;
1515const upn = username ;
1616
1717function authenticate ( options , callback ) {
@@ -33,7 +33,11 @@ function authenticate(options, callback) {
3333
3434 if ( start ) {
3535 krbClient . step ( '' , ( err , payload ) => {
36+ expect ( err ) . to . not . exist ;
37+
3638 db . command ( { saslStart : 1 , mechanism : 'GSSAPI' , payload } , ( err , dbResponse ) => {
39+ expect ( err ) . to . not . exist ;
40+
3741 authenticate (
3842 {
3943 db,
@@ -89,7 +93,7 @@ describe('Kerberos (win32)', function() {
8993
9094 kerberos . initializeClient (
9195 service ,
92- { user : username , domain : realm , password } ,
96+ { user : username , password } ,
9397 ( err , krbClient ) => {
9498 expect ( err ) . to . not . exist ;
9599
@@ -144,7 +148,7 @@ describe('Kerberos (win32)', function() {
144148 const db = client . db ( '$external' ) ;
145149
146150 return kerberos
147- . initializeClient ( service , { user : username , domain : realm , password } )
151+ . initializeClient ( service , { user : username , password } )
148152 . then ( krbClient => {
149153 return authenticate ( { db, krbClient, start : true } ) . then ( authResponse => {
150154 return krbClient . unwrap ( authResponse . challenge ) . then ( unwrapped => {
0 commit comments