From 1d0773e1e762d0362eeffb25be072f923941e712 Mon Sep 17 00:00:00 2001 From: Daniel Lenski Date: Mon, 22 Feb 2021 01:22:46 -0800 Subject: [PATCH] turns out F5 can have an authgroup dropdown See https://remote.autoliv.com for an example. TODO: parse it and add it to the form. Signed-off-by: Daniel Lenski --- f5.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/f5.c b/f5.c index b36cdfaf..f14236d8 100644 --- a/f5.c +++ b/f5.c @@ -55,6 +55,7 @@ int f5_obtain_cookie(struct openconnect_info *vpninfo) return ret; /* XX: build static form (username and password) */ + /* TODO: parse out 'domain' form field from /my.policy as authgroup */ form = calloc(1, sizeof(*form)); if (!form) { nomem: @@ -83,6 +84,9 @@ int f5_obtain_cookie(struct openconnect_info *vpninfo) buf_truncate(resp_buf); append_form_opts(vpninfo, form, resp_buf); + if (vpninfo->authgroup) + append_opt(resp_buf, "domain", vpninfo->authgroup); + if ((ret = buf_error(resp_buf))) goto out; do_https_request(vpninfo, "POST", "application/x-www-form-urlencoded", -- 2.49.0