Skip to content

Commit 0473218

Browse files
committed
feat(NODE-3777): emit deprecation warning
1 parent 31ca787 commit 0473218

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/cmap/auth/mongo_credentials.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Resolves the default auth mechanism according to
2-
32
import type { Document } from '../../bson';
43
import { MongoAPIError, MongoMissingCredentialsError } from '../../error';
4+
import { emitWarningOnce } from '../../utils';
55
import { AUTH_MECHS_AUTH_SRC_EXTERNAL, AuthMechanism } from './providers';
66

77
// https://github.com/mongodb/specifications/blob/master/source/auth/auth.rst
@@ -90,6 +90,9 @@ export class MongoCredentials {
9090
}
9191

9292
if ('gssapiCanonicalizeHostName' in this.mechanismProperties) {
93+
emitWarningOnce(
94+
'gssapiCanonicalizeHostName is deprecated. Please use CANONICALIZE_HOST_NAME instead.'
95+
);
9396
this.mechanismProperties.CANONICALIZE_HOST_NAME =
9497
this.mechanismProperties.gssapiCanonicalizeHostName;
9598
}

0 commit comments

Comments
 (0)