def ValidateRequest(self, req, _handler_access, _realm): """Called to verify user credentials given in HTTP request. """ wanted, _ = http.auth.HttpServerRequestAuthentication \ .ExtractUserPassword(req) assert username == wanted return users_file.PasswordFileUser(username, password, [rapi.RAPI_ACCESS_WRITE]).name
def _LookupUserWithWrite(name): if name == username: return users_file.PasswordFileUser(name, password, [access]) else: return None
def _LookupUserNoWrite(name): if name == username: return users_file.PasswordFileUser(name, password, []) else: return None