(username: str, password: str)
| 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 |
no outgoing calls
no test coverage detected
searching dependent graphs…