mirror of https://github.com/Yubico/python-fido2
Allow passing string value
This commit is contained in:
parent
a5357dd35c
commit
a7f3c51aca
|
@ -238,7 +238,9 @@ class CredProtectExtension(Ctap2Extension):
|
|||
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")
|
||||
|
|
Loading…
Reference in New Issue