Skip to content

Commit 242e764

Browse files
committed
update azurecallback, and remove utility generate.ts file
1 parent 748325c commit 242e764

4 files changed

Lines changed: 6 additions & 83 deletions

File tree

generate.ts

Lines changed: 0 additions & 77 deletions
This file was deleted.

src/cmap/auth/mongodb_oidc.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import type { Connection } from '../connection';
55
import { type AuthContext, AuthProvider } from './auth_provider';
66
import type { MongoCredentials } from './mongo_credentials';
77
import { AutomatedCallbackWorkflow } from './mongodb_oidc/automated_callback_workflow';
8-
import { callback as azureCallback } from './mongodb_oidc/azure_machine_workflow';
9-
import { gcpCallback as gcpCallback } from './mongodb_oidc/gcp_machine_workflow';
10-
import { k8sCallback as k8sCallback } from './mongodb_oidc/k8s_machine_workflow';
8+
import { azureCallback } from './mongodb_oidc/azure_machine_workflow';
9+
import { gcpCallback } from './mongodb_oidc/gcp_machine_workflow';
10+
import { k8sCallback } from './mongodb_oidc/k8s_machine_workflow';
1111
import { TokenCache } from './mongodb_oidc/token_cache';
1212
import { tokenMachineCallback as testCallback } from './mongodb_oidc/token_machine_workflow';
1313

src/cmap/auth/mongodb_oidc/azure_machine_workflow.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const TOKEN_RESOURCE_MISSING_ERROR =
1919
* @param params - The OIDC callback parameters.
2020
* @returns The OIDC response.
2121
*/
22-
export const callback: OIDCCallbackFunction = async (
22+
export const azureCallback: OIDCCallbackFunction = async (
2323
params: OIDCCallbackParams
2424
): Promise<OIDCResponse> => {
2525
const tokenAudience = params.tokenAudience;

test/unit/cmap/auth/mongodb_oidc/azure_machine_workflow.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expect } from 'chai';
22

3-
import { callback, OIDC_VERSION, type OIDCCallbackParams } from '../../../../mongodb';
3+
import { azureCallback, OIDC_VERSION, type OIDCCallbackParams } from '../../../../mongodb';
44

55
describe('Azure machine workflow', function () {
66
describe('#callback', function () {
@@ -12,7 +12,7 @@ describe('Azure machine workflow', function () {
1212
};
1313

1414
it('throws an error', async function () {
15-
const error = await callback(params).catch(error => error);
15+
const error = await azureCallback(params).catch(error => error);
1616
expect(error.message).to.include('TOKEN_RESOURCE');
1717
});
1818
});

0 commit comments

Comments
 (0)