locust-cloud 1.11.2__py3-none-any.whl → 1.11.4__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.
- locust_cloud/auth.py +13 -3
- {locust_cloud-1.11.2.dist-info → locust_cloud-1.11.4.dist-info}/METADATA +1 -1
- {locust_cloud-1.11.2.dist-info → locust_cloud-1.11.4.dist-info}/RECORD +5 -5
- {locust_cloud-1.11.2.dist-info → locust_cloud-1.11.4.dist-info}/WHEEL +0 -0
- {locust_cloud-1.11.2.dist-info → locust_cloud-1.11.4.dist-info}/entry_points.txt +0 -0
locust_cloud/auth.py
CHANGED
@@ -96,11 +96,14 @@ def register_auth(environment: locust.env.Environment):
|
|
96
96
|
session["challenge_session"] = credentials.get("challenge_session")
|
97
97
|
session["username"] = username
|
98
98
|
return redirect(url_for("locust_cloud_auth.password_reset"))
|
99
|
-
|
100
|
-
if os.getenv("CUSTOMER_ID", "") and credentials["customer_id"] != os.getenv("CUSTOMER_ID", ""):
|
99
|
+
if os.getenv("CUSTOMER_ID", "") and credentials.get("customer_id") != os.getenv("CUSTOMER_ID", ""):
|
101
100
|
session["auth_error"] = "Invalid login for this deployment"
|
102
101
|
return redirect(url_for("locust.login"))
|
103
102
|
|
103
|
+
if not credentials.get("user_sub_id"):
|
104
|
+
session["auth_error"] = "Unknown error during authentication, check logs and/or contact support"
|
105
|
+
return redirect(url_for("locust.login"))
|
106
|
+
|
104
107
|
response = redirect(url_for("locust.index"))
|
105
108
|
response = set_credentials(username, credentials, response)
|
106
109
|
login_user(AuthUser(credentials["user_sub_id"]))
|
@@ -221,10 +224,14 @@ def register_auth(environment: locust.env.Environment):
|
|
221
224
|
|
222
225
|
@auth_blueprint.route("/resend-code")
|
223
226
|
def resend_code():
|
227
|
+
if not session.get("username"):
|
228
|
+
session["auth_sign_up_error"] = "An unexpected error occured. Please try again."
|
229
|
+
return redirect(url_for("locust_cloud_auth.signup"))
|
230
|
+
|
224
231
|
try:
|
225
232
|
auth_response = requests.post(
|
226
233
|
f"{environment.parsed_options.deployer_url}/auth/resend-confirmation",
|
227
|
-
json={"username": session
|
234
|
+
json={"username": session.get("username")},
|
228
235
|
)
|
229
236
|
|
230
237
|
auth_response.raise_for_status()
|
@@ -244,6 +251,9 @@ def register_auth(environment: locust.env.Environment):
|
|
244
251
|
def confirm_signup():
|
245
252
|
if not environment.parsed_options.allow_signup:
|
246
253
|
return redirect(url_for("locust.login"))
|
254
|
+
if not session.get("user_sub_id"):
|
255
|
+
session["auth_sign_up_error"] = "An unexpected error occured. Please try again."
|
256
|
+
return redirect(url_for("locust_cloud_auth.signup"))
|
247
257
|
|
248
258
|
session["auth_sign_up_error"] = ""
|
249
259
|
confirmation_code = request.form.get("confirmation_code")
|
@@ -1,5 +1,5 @@
|
|
1
1
|
locust_cloud/__init__.py,sha256=Mibsyg96q15lEs7pmQ-zQ-MTLp0k2oYgseORKjsDYAI,3620
|
2
|
-
locust_cloud/auth.py,sha256=
|
2
|
+
locust_cloud/auth.py,sha256=76pucGMYyn2G1Gj3mpEQwwGcJ-pMrHT5iD44_QWDLok,16783
|
3
3
|
locust_cloud/cloud.py,sha256=lecZ5SRHuSfYQ15Heo5qxVA-kLjD-JEbfbSdvsdB4ro,15267
|
4
4
|
locust_cloud/credential_manager.py,sha256=MiESqS8IOxncBON04irK1-seF-VNAHHTcELcyxp1ZR8,5571
|
5
5
|
locust_cloud/idle_exit.py,sha256=bYD6LeUa0d8Ev2b1f-tiRXVnfyolCoACcDWC8zizNPE,1189
|
@@ -17,7 +17,7 @@ locust_cloud/webui/vite.config.ts,sha256=cqxPMkbwEA3H9mGGbuPulQUhIHCosUqm_1usxzs
|
|
17
17
|
locust_cloud/webui/yarn.lock,sha256=52aat3Nl-O3OVBRrKO4RMpNJFCIpodvop0rxp0iWo-E,220316
|
18
18
|
locust_cloud/webui/dist/index.html,sha256=uvHqVmQMDdDm0n8RbDoNeLMl1Y_uLtstxRf__hz5idc,664
|
19
19
|
locust_cloud/webui/dist/assets/index-BpUoQtjh.js,sha256=Q99aUgCZb4a_zeXtPG3XC29TRCxYbuWJVKjKMC56WOg,2865980
|
20
|
-
locust_cloud-1.11.
|
21
|
-
locust_cloud-1.11.
|
22
|
-
locust_cloud-1.11.
|
23
|
-
locust_cloud-1.11.
|
20
|
+
locust_cloud-1.11.4.dist-info/METADATA,sha256=GjPk5zgfKQZPS3GLWu5lF64Ld4CZ3HEHMuIP_EH_PvU,452
|
21
|
+
locust_cloud-1.11.4.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
22
|
+
locust_cloud-1.11.4.dist-info/entry_points.txt,sha256=PGyAb4e3aTsGS3N3VGShDl6VzJaXy7QwsEgsLOC7V00,57
|
23
|
+
locust_cloud-1.11.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|