1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-01 07:26:37 +00:00

Add gen_jwt_token RPC (#674)

* Add gen_jwt_token RPC

* Set error when failed to generate jwt token

* Modify RPC name

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
This commit is contained in:
feiniks
2024-07-31 18:03:41 +08:00
committed by GitHub
parent 0a084d3c8a
commit 77fa08566b
11 changed files with 94 additions and 56 deletions

View File

@@ -821,6 +821,10 @@ class SeafServerThreadedRpcClient(NamedPipeClient):
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):

View File

@@ -858,6 +858,9 @@ class SeafileAPI(object):
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()