@@ -343,6 +343,8 @@ pub struct CognitoEventUserPoolsCreateAuthChallengeRequest {
343
343
#[ serde( deserialize_with = "deserialize_lambda_map" ) ]
344
344
#[ serde( default ) ]
345
345
pub client_metadata : HashMap < String , String > ,
346
+ #[ serde( default ) ]
347
+ pub user_not_found : bool ,
346
348
}
347
349
348
350
/// `CognitoEventUserPoolsCreateAuthChallengeResponse` defines create auth challenge response parameters
@@ -389,6 +391,8 @@ where
389
391
#[ serde( deserialize_with = "deserialize_lambda_map" ) ]
390
392
#[ serde( default ) ]
391
393
pub client_metadata : HashMap < String , String > ,
394
+ #[ serde( default ) ]
395
+ pub user_not_found : bool ,
392
396
}
393
397
394
398
/// `CognitoEventUserPoolsVerifyAuthChallengeResponse` defines verify auth challenge response parameters
@@ -482,6 +486,20 @@ mod test {
482
486
assert_eq ! ( parsed, reparsed) ;
483
487
}
484
488
489
+ #[ test]
490
+ #[ cfg( feature = "cognito" ) ]
491
+ fn example_cognito_event_userpools_create_auth_challenge_user_not_found ( ) {
492
+ let data =
493
+ include_bytes ! ( "../../fixtures/example-cognito-event-userpools-create-auth-challenge-user-not-found.json" ) ;
494
+ let parsed: CognitoEventUserPoolsCreateAuthChallenge = serde_json:: from_slice ( data) . unwrap ( ) ;
495
+
496
+ assert ! ( parsed. request. user_not_found) ;
497
+
498
+ let output: String = serde_json:: to_string ( & parsed) . unwrap ( ) ;
499
+ let reparsed: CognitoEventUserPoolsCreateAuthChallenge = serde_json:: from_slice ( output. as_bytes ( ) ) . unwrap ( ) ;
500
+ assert_eq ! ( parsed, reparsed) ;
501
+ }
502
+
485
503
#[ test]
486
504
#[ cfg( feature = "cognito" ) ]
487
505
fn example_cognito_event_userpools_custommessage ( ) {
@@ -518,6 +536,20 @@ mod test {
518
536
assert_eq ! ( parsed, reparsed) ;
519
537
}
520
538
539
+ #[ test]
540
+ #[ cfg( feature = "cognito" ) ]
541
+ fn example_cognito_event_userpools_define_auth_challenge_user_not_found ( ) {
542
+ let data =
543
+ include_bytes ! ( "../../fixtures/example-cognito-event-userpools-define-auth-challenge-user-not-found.json" ) ;
544
+ let parsed: CognitoEventUserPoolsDefineAuthChallenge = serde_json:: from_slice ( data) . unwrap ( ) ;
545
+
546
+ assert ! ( parsed. request. user_not_found) ;
547
+
548
+ let output: String = serde_json:: to_string ( & parsed) . unwrap ( ) ;
549
+ let reparsed: CognitoEventUserPoolsDefineAuthChallenge = serde_json:: from_slice ( output. as_bytes ( ) ) . unwrap ( ) ;
550
+ assert_eq ! ( parsed, reparsed) ;
551
+ }
552
+
521
553
#[ test]
522
554
#[ cfg( feature = "cognito" ) ]
523
555
fn example_cognito_event_userpools_migrateuser ( ) {
@@ -612,4 +644,18 @@ mod test {
612
644
let reparsed: CognitoEventUserPoolsVerifyAuthChallenge = serde_json:: from_slice ( output. as_bytes ( ) ) . unwrap ( ) ;
613
645
assert_eq ! ( parsed, reparsed) ;
614
646
}
647
+
648
+ #[ test]
649
+ #[ cfg( feature = "cognito" ) ]
650
+ fn example_cognito_event_userpools_verify_auth_challenge_user_not_found ( ) {
651
+ let data =
652
+ include_bytes ! ( "../../fixtures/example-cognito-event-userpools-verify-auth-challenge-user-not-found.json" ) ;
653
+ let parsed: CognitoEventUserPoolsVerifyAuthChallenge = serde_json:: from_slice ( data) . unwrap ( ) ;
654
+
655
+ assert ! ( parsed. request. user_not_found) ;
656
+
657
+ let output: String = serde_json:: to_string ( & parsed) . unwrap ( ) ;
658
+ let reparsed: CognitoEventUserPoolsVerifyAuthChallenge = serde_json:: from_slice ( output. as_bytes ( ) ) . unwrap ( ) ;
659
+ assert_eq ! ( parsed, reparsed) ;
660
+ }
615
661
}
0 commit comments