Skip to content

Commit 1121bbe

Browse files
committed
fix: lint
1 parent ac9288c commit 1121bbe

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

src/cmap/auth/mongodb_oidc.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { MongoInvalidArgumentError, MongoMissingCredentialsError } from '../../error';
2-
import { hostMatchesWildcards } from '../../utils';
32
import type { HandshakeDocument } from '../connect';
43
import { type AuthContext, AuthProvider } from './auth_provider';
5-
import { DEFAULT_ALLOWED_HOSTS, MongoCredentials } from './mongo_credentials';
4+
import type { MongoCredentials } from './mongo_credentials';
65
import { AwsServiceWorkflow } from './mongodb_oidc/aws_service_workflow';
76
import { CallbackWorkflow } from './mongodb_oidc/callback_workflow';
87
import type { Workflow } from './mongodb_oidc/workflow';

src/cmap/auth/mongodb_oidc/callback_workflow.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ export class CallbackWorkflow implements Workflow {
7676
refreshCallback || null
7777
);
7878
let result;
79-
// Reauthentication must go through all the steps again regards of a cache entry
80-
// being present.
8179
if (entry) {
80+
// Reauthentication cannot use a token from the cache since the server has
81+
// stated it is invalid by the request for reauthentication.
8282
if (entry.isValid() && !reauthenticating) {
8383
// Presence of a valid cache entry means we can skip to the finishing step.
8484
result = await this.finishAuthentication(
@@ -127,7 +127,6 @@ export class CallbackWorkflow implements Workflow {
127127
}
128128
}
129129
} else {
130-
console.log('NO ENTRY IN THE CACHE', reauthenticating);
131130
// No entry in the cache requires us to do all authentication steps
132131
// from start to finish, including getting a fresh token for the cache.
133132
const startDocument = await this.startAuthentication(

src/connection_string.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import {
3232
emitWarning,
3333
emitWarningOnce,
3434
HostAddress,
35-
hostMatchesWildcards,
3635
isRecord,
3736
matchesParentDomain,
3837
parseInteger,

src/mongo_client.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
import type { TcpNetConnectOpts } from 'net';
2-
import { DEFAULT_ECDH_CURVE, ConnectionOptions as TLSConnectionOptions, TLSSocketOptions } from 'tls';
2+
import type { ConnectionOptions as TLSConnectionOptions, TLSSocketOptions } from 'tls';
33
import { promisify } from 'util';
44

55
import { BSONSerializeOptions, Document, resolveBSONOptions } from './bson';
66
import { ChangeStream, ChangeStreamDocument, ChangeStreamOptions } from './change_stream';
7-
import { AuthMechanismProperties, DEFAULT_ALLOWED_HOSTS, MongoCredentials } from './cmap/auth/mongo_credentials';
7+
import {
8+
AuthMechanismProperties,
9+
DEFAULT_ALLOWED_HOSTS,
10+
MongoCredentials
11+
} from './cmap/auth/mongo_credentials';
812
import { AuthMechanism } from './cmap/auth/providers';
913
import type { LEGAL_TCP_SOCKET_OPTIONS, LEGAL_TLS_SOCKET_OPTIONS } from './cmap/connect';
1014
import type { Connection } from './cmap/connection';
@@ -25,7 +29,7 @@ import { readPreferenceServerSelector } from './sdam/server_selection';
2529
import type { SrvPoller } from './sdam/srv_polling';
2630
import { Topology, TopologyEvents } from './sdam/topology';
2731
import { ClientSession, ClientSessionOptions, ServerSessionPool } from './sessions';
28-
import { HostAddress, MongoDBNamespace, hostMatchesWildcards, ns, resolveOptions } from './utils';
32+
import { HostAddress, hostMatchesWildcards, MongoDBNamespace, ns, resolveOptions } from './utils';
2933
import type { W, WriteConcern, WriteConcernSettings } from './write_concern';
3034

3135
/** @public */

0 commit comments

Comments
 (0)