Skip to content
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

Expose parsed & validated AttestationStatement in VerifiedRegistration #222

Open
bschoenmaeckers opened this issue Jul 3, 2024 · 1 comment

Comments

@bschoenmaeckers
Copy link
Contributor

bschoenmaeckers commented Jul 3, 2024

Currently VerifiedRegistration contains the attestation_object as bytes but it would be convinient if VerifiedRegistration contains the parsed AttestationStatement. This would make it easy to save the statement for later use without parsing the whole attestation_object again.

@MasterKale
Copy link
Collaborator

MasterKale commented Aug 12, 2024

Hello @bschoenmaeckers, to summarize the ask here, you'd like to see a new "attestation_statement" property added to VerifiedRegistration that contains the value of attestation_object.att_stmt (type of AttestationStatement)?

As an alternative approach, are you aware of the numerous helpers available in webauthn.helpers? webauthn.helpers.parse_attestation_object can be imported directly to run on VerifiedRegistration.attestation_object to then pull out of att_stmt whatever you want:

from webauthn import verify_registration_response
from webauthn.helpers import parse_attestation_object

verification = verify_registration_response(...)

attestation_statement = parse_attestation_object(verification.attestation_object).att_stmt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants