From f184e114ccdade06bc4662589c9f3b3070b740d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20LELEU?= Date: Thu, 1 Feb 2024 09:42:19 +0100 Subject: [PATCH] more logs --- README.md | 2 +- .../java/com/casinthecloud/simpletest/cas/CasLogin.java | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 40ff4e9..f1c9b9d 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ import com.casinthecloud.simpletest.execution.Execution; public class Main { public static void main(final String... args) throws Exception { - new Execution(3, 1000, CasLogin::new).launch(); + new Execution(6, 2000, CasLogin::new).launch(); } } ``` diff --git a/src/main/java/com/casinthecloud/simpletest/cas/CasLogin.java b/src/main/java/com/casinthecloud/simpletest/cas/CasLogin.java index 38c56b8..6b84c49 100644 --- a/src/main/java/com/casinthecloud/simpletest/cas/CasLogin.java +++ b/src/main/java/com/casinthecloud/simpletest/cas/CasLogin.java @@ -52,9 +52,13 @@ protected String callLoginPage(final Context ctx) throws Exception { protected void postCredentials(final Context ctx, final String loginUrl) throws Exception { val webflow = substringBetween(ctx.getBody(), "name=\"execution\" value=\"", "\"/>"); + val username = getUsername(); + val password = getPassword(); + info("Logging in: " + username + " / " + password); + val fp = ctx.getFormParameters(); - fp.put("username", getUsername()); - fp.put("password", getPassword()); + fp.put("username", username); + fp.put("password", password); fp.put("execution", webflow); fp.put("_eventId", "submit"); fp.put("geolocation", "");