soft-webauthn icon indicating copy to clipboard operation
soft-webauthn copied to clipboard

Make the result for create and get as JSON serializable to be able to send to a Server Endpoints

Open mkalioby opened this issue 2 years ago • 2 comments

Thanks for great library.

I used to test our server implementation and we needed the res to be JSON serializable.

mkalioby avatar Jun 02 '23 08:06 mkalioby

Hi,

thank you for the effort, but proposed change would break API (it changes the return values from basic functions). We should keep the device return values and leave encoding required by specific applications to the respective applications.

bodik avatar Jun 02 '23 08:06 bodik

reopening in favor of investigating of a new standard which seems to be related to this request

================================================================================================= warnings summary =================================================================================================
tests/test_example.py: 5 warnings
tests/test_interop.py: 15 warnings
  /opt/soft-webauthn/venv/lib/python3.9/site-packages/fido2/features.py:66: DeprecationWarning: Deprecated use of webauthn_json_mapping.
  
  You are using deprecated functionality which will change in the next major version of
  python-fido2. You can opt-in to use the new functionality now by adding the following
  to your code somewhere where it gets executed prior to using the affected functionality:
  
    import fido2.features
    fido2.features.webauthn_json_mapping.enabled = True
  
  To silence this warning but retain the current behavior, instead set enabled to False:
    fido2.features.webauthn_json_mapping.enabled = False
  
  JSON values for WebAuthn data class Mapping interface.
  
  This changes the keys and values used by the webauthn data classes when accessed using
  the Mapping (dict) interface (eg. user_entity["id"] and the from_dict() methods) to be
  JSON-friendly and align with the current draft of the next WebAuthn Level specification.
  For the most part, this means that binary values (bytes) are represented as URL-safe
  base64 encoded strings instead.

bodik avatar Jun 09 '23 11:06 bodik