[docs]defauthenticate(self,config:Config,request:Request)->Optional[User]:firewall_user=config.get_string_option("authentication.firewall_user",default=None)firewall_email=config.get_string_option("authentication.firewall_email",default=None)ifnotfirewall_user:raiseAuthenticationError("Firewall auth enabled but authentication.firewall_user not defined")ifnotfirewall_email:raiseAuthenticationError("Firewall auth enabled but authentication.firewall_email not defined")iffirewall_usernotinrequest.headers:raiseAuthenticationError(f"Header {firewall_user} not found")iffirewall_emailnotinrequest.headers:raiseAuthenticationError(f"Header {firewall_email} not found")returnUser(request.headers[firewall_user],request.headers[firewall_email])