Skip to content

Commit

Permalink
Merge pull request #235 from ggirol-rc/return_uv_flag
Browse files Browse the repository at this point in the history
authentication: return user verified flag
  • Loading branch information
MasterKale authored Jan 16, 2025
2 parents 42537f5 + 4aafae1 commit aa365d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_verify_authentication_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def test_verify_authentication_response_with_EC2_public_key(self):
assert verification.new_sign_count == 78
assert verification.credential_backed_up == False
assert verification.credential_device_type == "single_device"
assert not verification.user_verified

def test_verify_authentication_response_with_RSA_public_key(self):
credential = """{
Expand Down Expand Up @@ -78,6 +79,7 @@ def test_verify_authentication_response_with_RSA_public_key(self):
)

assert verification.new_sign_count == 1
assert verification.user_verified

def test_raises_exception_on_incorrect_public_key(self):
credential = """{
Expand Down
2 changes: 2 additions & 0 deletions webauthn/authentication/verify_authentication_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class VerifiedAuthentication:
new_sign_count: int
credential_device_type: CredentialDeviceType
credential_backed_up: bool
user_verified: bool


expected_token_binding_statuses = [
Expand Down Expand Up @@ -180,4 +181,5 @@ def verify_authentication_response(
new_sign_count=auth_data.sign_count,
credential_device_type=parsed_backup_flags.credential_device_type,
credential_backed_up=parsed_backup_flags.credential_backed_up,
user_verified=auth_data.flags.uv,
)

0 comments on commit aa365d7

Please sign in to comment.