-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
The icon field of PublicKeyCredentialEntity has been removed from the specification #634
Comments
Hi @abcang, Indeed, I missed removing the <?php
use Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer;
$serializer->serialize(
Webauthn\PublicKeyCredentialRpEntity::create(
'rp name',
'rp.id'
),
'json',
[AbstractObjectNormalizer::SKIP_NULL_VALUES => true]
); The output will be as expected: {"id":"rp.id","name":"rp name"} |
Thank you very much! I will tentatively use that option. |
The |
Thank you! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Version(s) affected
5.0.0
Description
The icon field of PublicKeyCredentialEntity has been removed from the specification (w3c/webauthn#1337). So it can be removed from the implementation.
When using the WebauthnSerializerFactory serializer to serialize a PublicKeyCredentialRpEntity with an unspecified icon to JSON, the icon field appears as null. I am concerned that this may cause unexpected behavior.
How to reproduce
Output:
Possible Solution
A tentative fix would be to create a Denormalizer to filter out nulls, similar to the PublicKeyCredentialUserEntity. A radical fix would be to remove the icon property from PublicKeyCredentialEntity.
Additional Context
No response
The text was updated successfully, but these errors were encountered: