Skip to content

Commit

Permalink
refactor(NODE-5464): rename to callback workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
durran committed Nov 9, 2023
1 parent 2dc6f83 commit 40b2da7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/cmap/auth/mongodb_oidc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { type AuthContext, AuthProvider } from './auth_provider';
import type { MongoCredentials } from './mongo_credentials';
import { AwsMachineWorkflow } from './mongodb_oidc/aws_machine_workflow';
import { AzureMachineWorkflow } from './mongodb_oidc/azure_machine_workflow';
import { HumanWorkflow } from './mongodb_oidc/human_workflow';
import { CallbackWorkflow } from './mongodb_oidc/callback_workflow';

/** Error when credentials are missing. */
const MISSING_CREDENTIALS_ERROR = 'AuthContext must provide credentials.';
Expand Down Expand Up @@ -74,7 +74,7 @@ export interface Workflow {

/** @internal */
export const OIDC_WORKFLOWS: Map<ProviderName, Workflow> = new Map();
OIDC_WORKFLOWS.set('callback', new HumanWorkflow());
OIDC_WORKFLOWS.set('callback', new CallbackWorkflow());
OIDC_WORKFLOWS.set('aws', new AwsMachineWorkflow());
OIDC_WORKFLOWS.set('azure', new AzureMachineWorkflow());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const NO_REQUEST_CALLBACK = 'No REQUEST_TOKEN_CALLBACK provided for callback wor
* OIDC implementation of a callback based workflow.
* @internal
*/
export class HumanWorkflow implements Workflow {
export class CallbackWorkflow implements Workflow {
/**
* Get the document to add for speculative authentication. This also needs
* to add a db field from the credentials source.
Expand Down
2 changes: 1 addition & 1 deletion test/mongodb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export * from '../src/cmap/auth/mongodb_oidc';
export * from '../src/cmap/auth/mongodb_oidc/aws_machine_workflow';
export * from '../src/cmap/auth/mongodb_oidc/azure_machine_workflow';
export * from '../src/cmap/auth/mongodb_oidc/azure_token_cache';
export * from '../src/cmap/auth/mongodb_oidc/human_workflow';
export * from '../src/cmap/auth/mongodb_oidc/callback_workflow';
export * from '../src/cmap/auth/mongodb_oidc/machine_workflow';
export * from '../src/cmap/auth/plain';
export * from '../src/cmap/auth/providers';
Expand Down

0 comments on commit 40b2da7

Please sign in to comment.