isrpa 0.9.5__py3-none-any.whl → 0.9.6__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.
isrpa/credentials.py
CHANGED
@@ -23,7 +23,7 @@ def store_key(key_name,key_value,user_name):
|
|
23
23
|
# 请求体的数据
|
24
24
|
data = {
|
25
25
|
'certificate_key': key_name,
|
26
|
-
'certificate_value': key_value,
|
26
|
+
'certificate_value': encode(key_value),
|
27
27
|
'user_name': user_name
|
28
28
|
}
|
29
29
|
print(data)
|
@@ -108,5 +108,29 @@ def exist(key_name, user_name):
|
|
108
108
|
|
109
109
|
return True
|
110
110
|
|
111
|
+
def encode(certificate_value):
|
112
|
+
"""
|
113
|
+
获取密钥
|
114
|
+
key_name:凭证key
|
115
|
+
"""
|
116
|
+
url = f"{address}/console/api/get_encode_credentials"
|
117
|
+
print(url)
|
118
|
+
headers = {
|
119
|
+
'Content-Type': 'application/json', # 说明请求体是 JSON 格式
|
120
|
+
}
|
121
|
+
# 请求体的数据
|
122
|
+
data = {
|
123
|
+
'certificate_value': certificate_value,
|
124
|
+
}
|
125
|
+
print(data)
|
126
|
+
response = requests.post(url, headers=headers, json=data)
|
127
|
+
if response.status_code != 200:
|
128
|
+
print("请求失败,状态码:", response.status_code)
|
129
|
+
print(response.text)
|
130
|
+
return "failure"
|
131
|
+
json = response.json()
|
132
|
+
return json['certificate_value']
|
133
|
+
|
134
|
+
|
111
135
|
if __name__ == '__main__':
|
112
|
-
print(
|
136
|
+
print(store_key("cc11111c","wqqwqqww","zhouly@i-search.com.cn"))
|
@@ -2,10 +2,10 @@ isrpa/OCR.py,sha256=nSDmVLo_z9GV7GUY57xBh2kumERG5_xtpUPxeF6ziQE,2509
|
|
2
2
|
isrpa/Template.py,sha256=UP1uovLvJzXEPGo_hzLrIYOu3vZP8Cf6m3G2hGzQ6XA,1958
|
3
3
|
isrpa/Template_Exception.py,sha256=an6eQ1NMB8a9R-J0yyMdwHIZcZeDtdV5f7fWKZQsZ3s,819
|
4
4
|
isrpa/__init__.py,sha256=pG-YPVG0gJIJ6s4xcAz9S_CnUxpUcz33wl9eNUSgxGk,20
|
5
|
-
isrpa/credentials.py,sha256=
|
5
|
+
isrpa/credentials.py,sha256=LoIf_wxrh8GB4DaJ-sOGuxWeVai-EWlncF0zOmT0BrA,4019
|
6
6
|
isrpa/message.py,sha256=N0s6hMaC5S-Pi4EhwcSp-ngfBTBQyW6ymU9sI9dUSeE,11329
|
7
7
|
isrpa/utils.py,sha256=uPCb1A1vDB0nTlII2BJz9kS0amk7mvzVA7ilI-UYA8Q,51439
|
8
|
-
isrpa-0.9.
|
9
|
-
isrpa-0.9.
|
10
|
-
isrpa-0.9.
|
11
|
-
isrpa-0.9.
|
8
|
+
isrpa-0.9.6.dist-info/METADATA,sha256=3Fr5AxvfiZ85i0qd1WooM0v1rSHd2RFx0PI5kKOCl6A,511
|
9
|
+
isrpa-0.9.6.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
|
10
|
+
isrpa-0.9.6.dist-info/top_level.txt,sha256=J5HJbtR2WAeKnW1rrpkiuapwnlswv3RgM-riyZD87o0,6
|
11
|
+
isrpa-0.9.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|