Skip to content

Commit

Permalink
Delete gen_jwt_token API
Browse files Browse the repository at this point in the history
  • Loading branch information
杨赫然 committed Sep 18, 2024
1 parent aa5a794 commit a015fd1
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 31 deletions.
16 changes: 0 additions & 16 deletions common/rpc-service.c
Original file line number Diff line number Diff line change
Expand Up @@ -4645,22 +4645,6 @@ seafile_search_files_by_path (const char *repo_id, const char *path, const char
return g_list_reverse (ret);
}

char *
seafile_generate_notif_server_jwt (const char *repo_id, const char *username, GError **error)
{
if (!repo_id || !username) {
g_set_error (error, SEAFILE_DOMAIN, SEAF_ERR_BAD_ARGS, "Argument should not be null");
return NULL;
}

char *token = seaf_gen_notif_server_jwt (repo_id, username);
if (!token) {
g_set_error (error, SEAFILE_DOMAIN, SEAF_ERR_INTERNAL,
"Failed to generate jwt token");
}
return token;
}

/*RPC functions merged from ccnet-server*/
int
ccnet_rpc_add_emailuser (const char *email, const char *passwd,
Expand Down
3 changes: 0 additions & 3 deletions include/seafile-rpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1155,9 +1155,6 @@ seafile_search_files (const char *repo_id, const char *str, GError **error);
GList *
seafile_search_files_by_path (const char *repo_id, const char *path, const char *str, GError **error);

char *
seafile_generate_notif_server_jwt (const char *repo_id, const char *username, GError **error);

/*Following is ccnet rpc*/
int
ccnet_rpc_add_emailuser (const char *email, const char *passwd,
Expand Down
4 changes: 0 additions & 4 deletions python/seafile/rpcclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -826,10 +826,6 @@ def search_files(self, repo_id, search_str):
def search_files_by_path(self, repo_id, path, search_str):
pass

@searpc_func("string", ["string", "string"])
def generate_notif_server_jwt(self, repo_id, username):
pass

#user management
@searpc_func("int", ["string", "string", "int", "int"])
def add_emailuser(self, email, passwd, is_staff, is_active):
Expand Down
3 changes: 0 additions & 3 deletions python/seaserv/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,9 +862,6 @@ def search_files(self, repo_id, search_str):
def search_files_by_path (self, repo_id, path, search_str):
return seafserv_threaded_rpc.search_files_by_path(repo_id, path, search_str)

def gen_notif_server_jwt (self, repo_id, username):
return seafserv_threaded_rpc.generate_notif_server_jwt (repo_id, username)

seafile_api = SeafileAPI()

class CcnetAPI(object):
Expand Down
5 changes: 0 additions & 5 deletions server/seaf-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,6 @@ static void start_rpc_service (const char *seafile_dir,
"search_files_by_path",
searpc_signature_objlist__string_string_string());

searpc_server_register_function ("seafserv-threaded-rpcserver",
seafile_generate_notif_server_jwt,
"generate_notif_server_jwt",
searpc_signature_string__string_string());

/* share repo to user */
searpc_server_register_function ("seafserv-threaded-rpcserver",
seafile_add_share,
Expand Down

0 comments on commit a015fd1

Please sign in to comment.