@@ -2656,22 +2656,22 @@ public void one_time_password_generator_time_based_generates_with_standard_optio
2656
2656
2657
2657
} ;
2658
2658
2659
- pg . ToString ( ) . ShouldBe ( "otpauth://totp/Google:test@google .com?secret=pwq65q55&issuer=Google" ) ;
2659
+ pg . ToString ( ) . ShouldBe ( "otpauth://totp/Google:test%40google .com?secret=pwq65q55&issuer=Google" ) ;
2660
2660
}
2661
2661
2662
2662
2663
2663
[ Fact ]
2664
2664
[ Category ( "PayloadGenerator/OneTimePassword" ) ]
2665
- public void one_time_password_generator_time_based_generates_with_standard_options_escapes_issuer ( )
2665
+ public void one_time_password_generator_time_based_generates_with_standard_options_escapes_issuer_and_label ( )
2666
2666
{
2667
2667
var pg = new PayloadGenerator . OneTimePassword
2668
2668
{
2669
2669
Secret = "pwq6 5q55" ,
2670
2670
Issuer = "Google Google" ,
2671
-
2671
+ Label = "test/test @google.com" ,
2672
2672
} ;
2673
2673
2674
- pg . ToString ( ) . ShouldBe ( "otpauth://totp/Google%20Google:test@google .com?secret=pwq65q55&issuer=Google%20Google" ) ;
2674
+ pg . ToString ( ) . ShouldBe ( "otpauth://totp/Google%20Google:test%2Ftest%40google .com?secret=pwq65q55&issuer=Google%20Google" ) ;
2675
2675
}
2676
2676
2677
2677
@@ -2688,23 +2688,23 @@ public void one_time_password_generator_hmac_based_generates_with_standard_optio
2688
2688
Counter = 500 ,
2689
2689
} ;
2690
2690
2691
- pg . ToString ( ) . ShouldBe ( "otpauth://hotp/Google:test@google .com?secret=pwq65q55&issuer=Google&counter=500" ) ;
2691
+ pg . ToString ( ) . ShouldBe ( "otpauth://hotp/Google:test%40google .com?secret=pwq65q55&issuer=Google&counter=500" ) ;
2692
2692
}
2693
2693
2694
2694
[ Fact ]
2695
2695
[ Category ( "PayloadGenerator/OneTimePassword" ) ]
2696
- public void one_time_password_generator_hmac_based_generates_with_standard_options_escapes_issuer ( )
2696
+ public void one_time_password_generator_hmac_based_generates_with_standard_options_escapes_issuer_and_label ( )
2697
2697
{
2698
2698
var pg = new PayloadGenerator . OneTimePassword
2699
2699
{
2700
2700
Secret = "pwq6 5q55" ,
2701
2701
Issuer = "Google Google" ,
2702
-
2702
+ Label = "test/test @google.com" ,
2703
2703
Type = PayloadGenerator . OneTimePassword . OneTimePasswordAuthType . HOTP ,
2704
2704
Counter = 500 ,
2705
2705
} ;
2706
2706
2707
- pg . ToString ( ) . ShouldBe ( "otpauth://hotp/Google%20Google:test@google .com?secret=pwq65q55&issuer=Google%20Google&counter=500" ) ;
2707
+ pg . ToString ( ) . ShouldBe ( "otpauth://hotp/Google%20Google:test%2Ftest%40google .com?secret=pwq65q55&issuer=Google%20Google&counter=500" ) ;
2708
2708
}
2709
2709
2710
2710
0 commit comments