eclinical-requester 1.0.14__py3-none-any.whl → 1.0.15__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- api_requester/__init__.py +1 -1
- api_requester/core/call_api.py +2 -1
- api_requester/dto/user.py +2 -1
- api_requester/http/authorize.py +5 -0
- {eclinical_requester-1.0.14.dist-info → eclinical_requester-1.0.15.dist-info}/METADATA +1 -1
- {eclinical_requester-1.0.14.dist-info → eclinical_requester-1.0.15.dist-info}/RECORD +9 -9
- {eclinical_requester-1.0.14.dist-info → eclinical_requester-1.0.15.dist-info}/WHEEL +0 -0
- {eclinical_requester-1.0.14.dist-info → eclinical_requester-1.0.15.dist-info}/licenses/LICENSE +0 -0
- {eclinical_requester-1.0.14.dist-info → eclinical_requester-1.0.15.dist-info}/top_level.txt +0 -0
api_requester/__init__.py
CHANGED
api_requester/core/call_api.py
CHANGED
@@ -22,7 +22,7 @@ from api_requester.utils.placeholder_replacer import PlaceholderReplacer
|
|
22
22
|
class ApiRequester(BizBase):
|
23
23
|
|
24
24
|
def __init__(self, username=None, password=None, sponsor=None, study=None, test_env=None, app_env=None, app=None,
|
25
|
-
company=None, role=None, external=False, ttype=None, org_code=None):
|
25
|
+
company=None, role=None, external=False, ttype=None, org_code=None, token=None):
|
26
26
|
u = EClinicalUser(
|
27
27
|
username=username,
|
28
28
|
password=password,
|
@@ -35,6 +35,7 @@ class ApiRequester(BizBase):
|
|
35
35
|
role=role,
|
36
36
|
external=external,
|
37
37
|
org_code=org_code,
|
38
|
+
token=token,
|
38
39
|
)
|
39
40
|
super().__init__(u)
|
40
41
|
self.headers = dict()
|
api_requester/dto/user.py
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
class EClinicalUser:
|
12
12
|
|
13
13
|
def __init__(self, username=None, password=None, sponsor=None, study=None, test_env=None, app_env=None, app=None,
|
14
|
-
company=None, role=None, external=False, org_code=None):
|
14
|
+
company=None, role=None, external=False, org_code=None, token=None):
|
15
15
|
# username 用户名
|
16
16
|
# password 密码
|
17
17
|
# app 访问的系统
|
@@ -30,6 +30,7 @@ class EClinicalUser:
|
|
30
30
|
self.external = external
|
31
31
|
self.company_level_login = False
|
32
32
|
self.org_code = org_code
|
33
|
+
self.token = token # 使用token直接调用接口
|
33
34
|
|
34
35
|
def __repr__(self):
|
35
36
|
attributes = self.__dict__
|
api_requester/http/authorize.py
CHANGED
@@ -38,6 +38,11 @@ class Authorize(BizBase, AdminAuthService, AdminUserOnBoardApplicationServiceImp
|
|
38
38
|
CommonSystemEnvServiceImpl.__init__(self)
|
39
39
|
|
40
40
|
def login(self):
|
41
|
+
if self.user.token:
|
42
|
+
self.headers = SampleHeaders().add_authorization(self.user.token).to_h()
|
43
|
+
self.time_mills = time.time()
|
44
|
+
self.user.app = self.login_app
|
45
|
+
return
|
41
46
|
if self.login_app == AppEnum.CODING.code:
|
42
47
|
login_app_tip = "{0}({1})".format(self.login_app,
|
43
48
|
self.user.company_level_login is True and "admin" or "study")
|
@@ -1,6 +1,6 @@
|
|
1
|
-
api_requester/__init__.py,sha256=
|
1
|
+
api_requester/__init__.py,sha256=YsqkSvtfVTnvQT9ixQxpOUiMfu_xrPU1mDiaSFXsQ-M,176
|
2
2
|
api_requester/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
-
api_requester/core/call_api.py,sha256=
|
3
|
+
api_requester/core/call_api.py,sha256=nu3AANRty6IVdilRaFGmFeKQijuw6mrCgzU0WzHCOck,2803
|
4
4
|
api_requester/core/admin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
api_requester/core/admin/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
api_requester/core/admin/api/auth_api.py,sha256=dKKOuEnXIKgzhUfaNfSzNm24LREUcvPZ28xxTZisY6w,861
|
@@ -37,10 +37,10 @@ api_requester/docs/application.yaml,sha256=_yTaHYLd9CdGfM4ua3qbYOO3x36cWjFEcJmPG
|
|
37
37
|
api_requester/dto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
38
38
|
api_requester/dto/base_dto.py,sha256=nyBGidUblKE6MSK-yvcVSlYDyqPbIEdXiTOvymcFZp0,6904
|
39
39
|
api_requester/dto/biz_base.py,sha256=4lzf6FoXCNBr0OlxbFryf-7v16wfP3Hv6c7WUh-DgNs,874
|
40
|
-
api_requester/dto/user.py,sha256=
|
40
|
+
api_requester/dto/user.py,sha256=M27az447jYRSMJScDzUrP4tUduI22SpGCMe-oZlDTN8,1446
|
41
41
|
api_requester/http/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
42
42
|
api_requester/http/app_url.py,sha256=jTGwxPcu_yts4WZbE9wDl6HqGOB48BdEIGw4Otmo1F0,939
|
43
|
-
api_requester/http/authorize.py,sha256=
|
43
|
+
api_requester/http/authorize.py,sha256=pUEFYCZRixXp6wlhfpINWLy3R9NQA59W8ZRfG05Xv-c,7830
|
44
44
|
api_requester/http/authorize_ecoa.py,sha256=7KPjkCLp4xjMFybT66GSqhIeelGtn2sP-DokydBuQiI,3940
|
45
45
|
api_requester/http/authorize_ediary.py,sha256=zWNR-4Z8jg0ytYmoZJ9upFQIjKMCsv49Qp8gj846mBc,2935
|
46
46
|
api_requester/http/eclinical_requests.py,sha256=JUQ7EPeAvspz-J6GvpoVM2kA4hyGN4AP166hyQlmeFM,9640
|
@@ -59,8 +59,8 @@ api_requester/utils/placeholder_replacer.py,sha256=umNGeA1KCQ6Ewzsv1xEehLmHtKkgv
|
|
59
59
|
api_requester/utils/read_file.py,sha256=M4oskAPDzefeVXfhhNmLe4GOjBKNi9WJLF4k474CTlo,2304
|
60
60
|
api_requester/utils/rsa.py,sha256=dr2m3a2M_LYu1Us97EEiMcjZAkpn1yWKIOjyYYubZeg,1202
|
61
61
|
api_requester/utils/time_utils.py,sha256=u1hHO0POBhdXaTQ7VGY_2YjaYxwlrWXGb5phP8iLfOY,579
|
62
|
-
eclinical_requester-1.0.
|
63
|
-
eclinical_requester-1.0.
|
64
|
-
eclinical_requester-1.0.
|
65
|
-
eclinical_requester-1.0.
|
66
|
-
eclinical_requester-1.0.
|
62
|
+
eclinical_requester-1.0.15.dist-info/licenses/LICENSE,sha256=6kbiFSfobTZ7beWiKnHpN902HgBx-Jzgcme0SvKqhKY,1091
|
63
|
+
eclinical_requester-1.0.15.dist-info/METADATA,sha256=hnCHxjrQg2HE7FEUd9sYjzq815IMrleFZB8qXUlgIrE,719
|
64
|
+
eclinical_requester-1.0.15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
65
|
+
eclinical_requester-1.0.15.dist-info/top_level.txt,sha256=nM6wDThrKcbLCcBGrTBPPtstqV97VyITV-YiKLoUG0U,14
|
66
|
+
eclinical_requester-1.0.15.dist-info/RECORD,,
|
File without changes
|
{eclinical_requester-1.0.14.dist-info → eclinical_requester-1.0.15.dist-info}/licenses/LICENSE
RENAMED
File without changes
|
File without changes
|