From 188b1b0139dbd2a9347f34b129c204d6dd2a87aa Mon Sep 17 00:00:00 2001 From: O'Shaughnessy Evans Date: Thu, 11 Feb 2021 23:58:34 -0800 Subject: [PATCH] add support for `USER` and `PASSWORD` fields in pingfed provider in addition to recognizing `pf.username` and `pf.pass`, identifies `USER` and `PASSWORD` as alternatives in the pingfed SAML login form --- pkg/provider/pingfed/pingfed.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/provider/pingfed/pingfed.go b/pkg/provider/pingfed/pingfed.go index eabff4525..342036af8 100644 --- a/pkg/provider/pingfed/pingfed.go +++ b/pkg/provider/pingfed/pingfed.go @@ -136,6 +136,8 @@ func (ac *Client) handleLogin(ctx context.Context, doc *goquery.Document) (conte form.Values.Set("pf.username", loginDetails.Username) form.Values.Set("pf.pass", loginDetails.Password) + form.Values.Set("USER", loginDetails.Username) + form.Values.Set("PASSWORD", loginDetails.Password) form.URL = makeAbsoluteURL(form.URL, loginDetails.URL) req, err := form.BuildRequest() @@ -223,7 +225,7 @@ func (ac *Client) handleWebAuthn(ctx context.Context, doc *goquery.Document) (co } func docIsLogin(doc *goquery.Document) bool { - return doc.Has("input[name=\"pf.pass\"]").Size() == 1 + return doc.Has("input[name=\"pf.pass\"]").Size() == 1 || doc.Has("input[name=\"PASSWORD\"]").Size() == 1 } func docIsOTP(doc *goquery.Document) bool {