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