Skip to content

Commit e38c9e1

Browse files
author
Niranjan Jayakar
committed
Rename to otp
1 parent de90875 commit e38c9e1

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

packages/@aws-cdk/aws-cognito/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ new UserPool(this, 'myuserpool', {
178178
mfaEnforcement: MfaEnforcement.REQUIRED,
179179
mfaToken: {
180180
sms: true,
181-
oneTimePassword: true,
181+
otp: true,
182182
},
183183
});
184184
```

packages/@aws-cdk/aws-cognito/lib/user-pool.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ export interface MfaTypes {
331331
* The MFA token is a time-based one time password that is generated by a hardware or software token
332332
* @default false
333333
*/
334-
readonly oneTimePassword: boolean;
334+
readonly otp: boolean;
335335
}
336336

337337
/**
@@ -846,7 +846,7 @@ export class UserPool extends Resource implements IUserPool {
846846
if (props.mfaTypes!.sms) {
847847
enabledMfas.push('SMS_MFA');
848848
}
849-
if (props.mfaTypes!.oneTimePassword) {
849+
if (props.mfaTypes!.otp) {
850850
enabledMfas.push('SOFTWARE_TOKEN_MFA');
851851
}
852852
return enabledMfas;

packages/@aws-cdk/aws-cognito/test/integ.user-pool-explicit-props.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ new UserPool(stack, 'myuserpool', {
2828
mfaEnforcement: MfaEnforcement.REQUIRED,
2929
mfaTypes: {
3030
sms: true,
31-
oneTimePassword: true,
31+
otp: true,
3232
},
3333
passwordPolicy: {
3434
tempPasswordValidity: Duration.days(10),

packages/@aws-cdk/aws-cognito/test/user-pool.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -446,15 +446,15 @@ describe('User Pool', () => {
446446
userPoolName: 'Pool1',
447447
mfaTypes: {
448448
sms: true,
449-
oneTimePassword: true,
449+
otp: true,
450450
}
451451
});
452452
new UserPool(stack, 'Pool2', {
453453
userPoolName: 'Pool2',
454454
mfaEnforcement: MfaEnforcement.OFF,
455455
mfaTypes: {
456456
sms: true,
457-
oneTimePassword: true,
457+
otp: true,
458458
}
459459
});
460460

@@ -507,7 +507,7 @@ describe('User Pool', () => {
507507
mfaEnforcement: MfaEnforcement.REQUIRED,
508508
mfaTypes: {
509509
sms: true,
510-
oneTimePassword: true,
510+
otp: true,
511511
}
512512
});
513513

0 commit comments

Comments
 (0)