Skip to content

Commit

Permalink
Allow passing string value
Browse files Browse the repository at this point in the history
  • Loading branch information
dainnilsson committed Mar 4, 2024
1 parent a5357dd commit a7f3c51
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fido2/ctap2/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ class POLICY(Enum):
def process_create_input(self, inputs):
policy = inputs.get("credentialProtectionPolicy")
if policy:
index = list(CredProtectExtension.POLICY).index(policy)
index = list(CredProtectExtension.POLICY).index(
CredProtectExtension.POLICY(policy)
)
enforce = inputs.get("enforceCredentialProtectionPolicy", False)
if enforce and not self.is_supported() and index > 0:
raise ValueError("Authenticator does not support Credential Protection")
Expand Down

0 comments on commit a7f3c51

Please sign in to comment.