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

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mkalioby
Copy link

@mkalioby mkalioby commented Jun 2, 2023

Thanks for great library.

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

@bodik
Copy link
Owner

bodik commented Jun 2, 2023

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 bodik closed this Jun 2, 2023
@bodik
Copy link
Owner

bodik commented Jun 9, 2023

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 bodik reopened this Jun 9, 2023
bodik added a commit that referenced this pull request Jun 9, 2023
…apping.enabled

future function would change currently expected data representation

```
  You are using deprecated functionality which will change in the next major version of
  ...
  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.
```

also concerns
#13
bodik added a commit that referenced this pull request Jun 9, 2023
…apping.enabled

future function would change currently expected data representation

```
  You are using deprecated functionality which will change in the next major version of
  ...
  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.
```

also concerns
#13
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

Successfully merging this pull request may close these issues.

None yet

2 participants