Skip to content

authentication: return user verified flag #235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
)
Loading