async def get_by_api_key(self, db: AsyncSession, *, api_key: str) -> Optional[User]:
        """Get a user by API key using the encrypted key validation."""
        try:
            # Use the crud_api_key function that handles decryption
            from airweave.crud.crud_api_key import api_key as crud_api_key

            # This will handle the decryption and validation
            api_key_obj = await crud_api_key.get_by_key(db, key=api_key)

            # Get the user by email
            return await self.get_by_email(db, email=api_key_obj.created_by_email)
        except Exception:
            return None
Get a user by API key using the encrypted key validation.
backend/airweave/crud/crud_user.py