uipath 2.0.2.dev1__py3-none-any.whl → 2.0.3__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.
Potentially problematic release.
This version of uipath might be problematic. Click here for more details.
- uipath/_cli/_auth/_auth_server.py +35 -6
- {uipath-2.0.2.dev1.dist-info → uipath-2.0.3.dist-info}/METADATA +4 -4
- {uipath-2.0.2.dev1.dist-info → uipath-2.0.3.dist-info}/RECORD +5 -5
- {uipath-2.0.2.dev1.dist-info → uipath-2.0.3.dist-info}/WHEEL +0 -0
- {uipath-2.0.2.dev1.dist-info → uipath-2.0.3.dist-info}/entry_points.txt +0 -0
|
@@ -113,7 +113,13 @@ def make_request_handler_class(state, code_verifier, token_callback, domain):
|
|
|
113
113
|
|
|
114
114
|
class HTTPSServer:
|
|
115
115
|
def __init__(self, port=6234, cert_file="localhost.crt", key_file="localhost.key"):
|
|
116
|
-
"""Initialize HTTPS server with configurable parameters.
|
|
116
|
+
"""Initialize HTTPS server with configurable parameters.
|
|
117
|
+
|
|
118
|
+
Args:
|
|
119
|
+
port (int, optional): Port number to run the server on. Defaults to 6234.
|
|
120
|
+
cert_file (str, optional): SSL certificate file. Defaults to "localhost.crt".
|
|
121
|
+
key_file (str, optional): SSL key file. Defaults to "localhost.key".
|
|
122
|
+
"""
|
|
117
123
|
self.current_path = os.path.dirname(os.path.abspath(__file__))
|
|
118
124
|
self.port = port
|
|
119
125
|
self.cert_file = os.path.join(self.current_path, "localhost.crt")
|
|
@@ -123,17 +129,31 @@ class HTTPSServer:
|
|
|
123
129
|
self.should_shutdown = False
|
|
124
130
|
|
|
125
131
|
def token_received_callback(self, token_data):
|
|
126
|
-
"""Callback for when a token is received.
|
|
132
|
+
"""Callback for when a token is received.
|
|
133
|
+
|
|
134
|
+
Args:
|
|
135
|
+
token_data (dict): The received token data.
|
|
136
|
+
"""
|
|
127
137
|
self.token_data = token_data
|
|
128
138
|
self.should_shutdown = True
|
|
129
139
|
|
|
130
140
|
def create_server(self, state, code_verifier, domain):
|
|
131
|
-
"""Create and configure the HTTPS server.
|
|
141
|
+
"""Create and configure the HTTPS server.
|
|
142
|
+
|
|
143
|
+
Args:
|
|
144
|
+
state (str): The OAuth state parameter.
|
|
145
|
+
code_verifier (str): The PKCE code verifier.
|
|
146
|
+
domain (str): The domain for authentication.
|
|
147
|
+
|
|
148
|
+
Returns:
|
|
149
|
+
socketserver.TCPServer: The configured HTTPS server.
|
|
150
|
+
"""
|
|
132
151
|
# Create SSL context
|
|
133
152
|
context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
|
|
134
153
|
context.load_cert_chain(self.cert_file, self.key_file)
|
|
135
154
|
|
|
136
|
-
# Create server
|
|
155
|
+
# Create server with address reuse
|
|
156
|
+
socketserver.TCPServer.allow_reuse_address = True
|
|
137
157
|
handler = make_request_handler_class(
|
|
138
158
|
state, code_verifier, self.token_received_callback, domain
|
|
139
159
|
)
|
|
@@ -143,7 +163,16 @@ class HTTPSServer:
|
|
|
143
163
|
return self.httpd
|
|
144
164
|
|
|
145
165
|
def start(self, state, code_verifier, domain):
|
|
146
|
-
"""Start the server.
|
|
166
|
+
"""Start the server.
|
|
167
|
+
|
|
168
|
+
Args:
|
|
169
|
+
state (str): The OAuth state parameter.
|
|
170
|
+
code_verifier (str): The PKCE code verifier.
|
|
171
|
+
domain (str): The domain for authentication.
|
|
172
|
+
|
|
173
|
+
Returns:
|
|
174
|
+
dict: The received token data or an empty dict if no token was received.
|
|
175
|
+
"""
|
|
147
176
|
if not self.httpd:
|
|
148
177
|
self.create_server(state, code_verifier, domain)
|
|
149
178
|
|
|
@@ -159,7 +188,7 @@ class HTTPSServer:
|
|
|
159
188
|
return self.token_data if self.token_data else {}
|
|
160
189
|
|
|
161
190
|
def stop(self):
|
|
162
|
-
"""Stop the server gracefully."""
|
|
191
|
+
"""Stop the server gracefully and cleanup resources."""
|
|
163
192
|
if self.httpd:
|
|
164
193
|
self.httpd.server_close()
|
|
165
194
|
self.httpd = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: uipath
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.3
|
|
4
4
|
Summary: Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools.
|
|
5
5
|
Project-URL: Homepage, https://uipath.com
|
|
6
6
|
Project-URL: Repository, https://github.com/UiPath/uipath-python
|
|
@@ -190,8 +190,8 @@ To properly use the CLI for packaging and publishing, your project should includ
|
|
|
190
190
|
- A `uipath.json` file (generated by `uipath init`)
|
|
191
191
|
- Any Python files needed for your automation
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
## Development
|
|
194
194
|
|
|
195
|
-
|
|
195
|
+
### Setting Up a Development Environment
|
|
196
196
|
|
|
197
|
-
|
|
197
|
+
Please read our [contribution guidelines](CONTRIBUTING.md) before submitting a pull request.
|
|
@@ -14,7 +14,7 @@ uipath/_cli/cli_pack.py,sha256=gV7SKa3H4ftP1fx3cNLlUQs05ogtqBTIkBcgvvsoyj4,11582
|
|
|
14
14
|
uipath/_cli/cli_publish.py,sha256=_b9rehjsbxwkpH5_DtgFUaWWJqcZTg5nate-M5BnE_c,3586
|
|
15
15
|
uipath/_cli/cli_run.py,sha256=dV0a-sx78T0HJHArfZP2M9YhT8d8aOuf-9OdkBqj3fE,4577
|
|
16
16
|
uipath/_cli/middlewares.py,sha256=IiJgjsqrJVKSXx4RcIKHWoH-SqWqpHPbhzkQEybmAos,3937
|
|
17
|
-
uipath/_cli/_auth/_auth_server.py,sha256=
|
|
17
|
+
uipath/_cli/_auth/_auth_server.py,sha256=i1u4q_qv_pxrOjKmM3nJPXAzX3WtQzgGUQL9PM-YBYI,7148
|
|
18
18
|
uipath/_cli/_auth/_models.py,sha256=sYMCfvmprIqnZxStlD_Dxx2bcxgn0Ri4D7uwemwkcNg,948
|
|
19
19
|
uipath/_cli/_auth/_oidc_utils.py,sha256=WaX9jDlXrlX6yD8i8gsocV8ngjaT72Xd1tvsZMmSbco,2127
|
|
20
20
|
uipath/_cli/_auth/_portal_service.py,sha256=G5wiBlinLTar28b4p-d5alje28hSVqfBUDU7fNezpg4,5984
|
|
@@ -69,7 +69,7 @@ uipath/_utils/_request_override.py,sha256=_vibG78vEDWS3JKg2cJ5l6tpoBMLChUOauiqL1
|
|
|
69
69
|
uipath/_utils/_request_spec.py,sha256=iCtBLqtbWUpFG5g1wtIZBzSupKsfaRLiQFoFc_4B70Q,747
|
|
70
70
|
uipath/_utils/_user_agent.py,sha256=AcyXwxzdg1Woi-TuFdHzDExC34AgwW4_i9W8JVj-VZI,470
|
|
71
71
|
uipath/_utils/constants.py,sha256=xW-gbRasjdOwSj2rke4wfRCml69710oUaDNJcwFAZug,775
|
|
72
|
-
uipath-2.0.
|
|
73
|
-
uipath-2.0.
|
|
74
|
-
uipath-2.0.
|
|
75
|
-
uipath-2.0.
|
|
72
|
+
uipath-2.0.3.dist-info/METADATA,sha256=Co9580lqjbt_-VUlfjc9Zdd77hRhclQNJ_W0J193jsI,5774
|
|
73
|
+
uipath-2.0.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
74
|
+
uipath-2.0.3.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
|
|
75
|
+
uipath-2.0.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|