Skip to content

Commit

Permalink
Merge pull request #606 from oshaughnessy/pingfed-password-field
Browse files Browse the repository at this point in the history
add support for `USER` and `PASSWORD` fields in pingfed provider
  • Loading branch information
Mark Wolfe authored Feb 15, 2021
2 parents f119278 + 15f8c71 commit 790a74e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/provider/pingfed/pingfed.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 790a74e

Please sign in to comment.