コード例 #1
0
      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
コード例 #2
0
 def _LookupUserWithWrite(name):
     if name == username:
         return users_file.PasswordFileUser(name, password,
                                            [access])
     else:
         return None
コード例 #3
0
 def _LookupUserNoWrite(name):
     if name == username:
         return users_file.PasswordFileUser(name, password, [])
     else:
         return None