class User: def __init__(self, username: str): self._username = username self._authenticated = False def is_authenticated(self) -> bool: return self._authenticated def is_active(self) -> bool: return True def is_anonymous(self) -> bool: return False def get_id(self) -> str: return self._username def validate(self, _: str) -> bool: raise NotImplementedError()