MCPcopy Index your code
hub / github.com/python-websockets/websockets / check_credentials

Function check_credentials

src/websockets/sync/server.py:714–719  ·  view source on GitHub ↗
(username: str, password: str)

Source from the content-addressed store, hash-verified

712 credentials_dict = dict(credentials_list)
713
714 def check_credentials(username: str, password: str) -> bool:
715 try:
716 expected_password = credentials_dict[username]
717 except KeyError:
718 return False
719 return hmac.compare_digest(expected_password, password)
720
721 assert check_credentials is not None # help mypy
722

Callers 1

process_requestFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…