Skip to content

Commit

Permalink
Deprecate U2F server class
Browse files Browse the repository at this point in the history
  • Loading branch information
dainnilsson committed Nov 25, 2024
1 parent 12fd6ab commit 43d39c5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fido2/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,12 +442,16 @@ def _make_internal_state(
}


# TODO 2.0: Delete, or move to an example
def verify_app_id(app_id: str, origin: str) -> bool:
"""Checks if a FIDO U2F App ID is usable for a given origin.
:param app_id: The App ID to validate.
:param origin: The origin of the request.
:return: True if the App ID is usable by the origin, False if not.
.. deprecated:: 1.2.0
This will be removed in python-fido2 2.0.
"""
url = urlparse(app_id)
hostname = url.hostname
Expand All @@ -461,6 +465,7 @@ def verify_app_id(app_id: str, origin: str) -> bool:
return verify_rp_id(hostname, origin)


# TODO 2.0: Delete, or move to an example
class U2FFido2Server(Fido2Server):
"""Fido2Server which can be used with existing U2F credentials.
Expand All @@ -473,6 +478,9 @@ class U2FFido2Server(Fido2Server):
origin for U2F credentials.
For other parameters, see Fido2Server.
.. deprecated:: 1.2.0
This will be removed in python-fido2 2.0.
"""

def __init__(
Expand Down

0 comments on commit 43d39c5

Please sign in to comment.