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

Function check_credentials

src/websockets/asyncio/server.py:942–947  ·  view source on GitHub ↗
(username: str, password: str)

Source from the content-addressed store, hash-verified

940 credentials_dict = dict(credentials_list)
941
942 def check_credentials(username: str, password: str) -> bool:
943 try:
944 expected_password = credentials_dict[username]
945 except KeyError:
946 return False
947 return hmac.compare_digest(expected_password, password)
948
949 assert check_credentials is not None # help mypy
950

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…