async def check_passwd(self, <EOL>identity: str, <EOL>passwd: str<EOL>) -> SessionIdentity :
assert identity<EOL>value, _ = await self._client.get(f"<STR_LIT>")<EOL>if value is None:<EOL><INDENT>logger.debug(f'<STR_LIT>')<EOL>raise Unauthorized(f"<STR_LIT>")<EOL><DEDENT>profile = json.loads(value.decode('<STR_LIT:utf-8>'))<EOL>user_id = profile['<STR_LIT>']<EOL>identity = profile['<STR_LIT>']<EOL>hashed = profile['<STR_LIT>']<EOL>if sha256_crypt.verify(passwd, hashed):<EOL><INDENT>return SessionIdentity(user_id=user_id, identity=identity)<EOL><DEDENT>else:<EOL><INDENT>raise Unauthorized(f"<STR_LIT>")<EOL><DEDENT>
通过密码检查身份