File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ enum AuthenticatorType {
1616 oobOtpEmail,
1717 oobOtpSms,
1818 totp,
19+ passkey,
20+ unknown,
1921}
2022
2123extension AuthenticatorTypeExtension on AuthenticatorType {
@@ -29,6 +31,10 @@ extension AuthenticatorTypeExtension on AuthenticatorType {
2931 return "oob_otp_sms" ;
3032 case AuthenticatorType .totp:
3133 return "totp" ;
34+ case AuthenticatorType .passkey:
35+ return "passkey" ;
36+ case AuthenticatorType .unknown:
37+ return "unknown" ;
3238 }
3339 }
3440
@@ -42,15 +48,18 @@ extension AuthenticatorTypeExtension on AuthenticatorType {
4248 return AuthenticatorType .oobOtpSms;
4349 case "totp" :
4450 return AuthenticatorType .totp;
51+ case "passkey" :
52+ return AuthenticatorType .passkey;
4553 default :
46- throw Exception ( " unknown authenticator type: $ value " ) ;
54+ return AuthenticatorType . unknown;
4755 }
4856 }
4957}
5058
5159enum AuthenticatorKind {
5260 primary,
5361 secondary,
62+ unknown,
5463}
5564
5665extension AuthenticatorKindExtension on AuthenticatorKind {
@@ -60,6 +69,8 @@ extension AuthenticatorKindExtension on AuthenticatorKind {
6069 return "primary" ;
6170 case AuthenticatorKind .secondary:
6271 return "secondary" ;
72+ case AuthenticatorKind .unknown:
73+ return "unknown" ;
6374 }
6475 }
6576
@@ -70,7 +81,7 @@ extension AuthenticatorKindExtension on AuthenticatorKind {
7081 case "secondary" :
7182 return AuthenticatorKind .secondary;
7283 default :
73- throw Exception ( " unknown authenticator kind: $ value " ) ;
84+ return AuthenticatorKind . unknown;
7485 }
7586 }
7687}
You can’t perform that action at this time.
0 commit comments