This repository was archived by the owner on May 18, 2021. It is now read-only.
File tree Expand file treeCollapse file tree 2 files changed+8
-4
lines changedFilter options
+8
-4
lines changed Original file line number Diff line number Diff line change
@@ -28,10 +28,12 @@ type DuoClient struct {
28
28
Callback string
29
29
Device string
30
30
StateToken string
31
+
FactorID string
31
32
}
32
33
33
34
type StatusResp struct {
34
35
Response struct {
36
+
SessionID string `json:"sid"`
35
37
U2FSignRequest []struct {
36
38
Version string `json:"version"`
37
39
Challenge string `json:"challenge"`
@@ -57,12 +59,13 @@ type PromptResp struct {
57
59
Stat string `json:"stat"`
58
60
}
59
61
60
-
func NewDuoClient(host, signature, callback string) *DuoClient {
62
+
func NewDuoClient(host, signature, callback, factorID string) *DuoClient {
61
63
return &DuoClient{
62
64
Host: host,
63
65
Signature: signature,
64
66
Device: "phone1",
65
67
Callback: callback,
68
+
FactorID: factorID,
66
69
}
67
70
}
68
71
@@ -460,7 +463,7 @@ func (d *DuoClient) DoStatus(txid, sid string) (auth string, status StatusResp,
460
463
461
464
if status.Response.Result == "SUCCESS" {
462
465
if status.Response.ResultURL != "" {
463
-
auth, err = d.DoRedirect(status.Response.ResultURL, sid)
466
+
auth, err = d.DoRedirect(status.Response.ResultURL, status.Response.SessionID)
464
467
} else {
465
468
auth = status.Response.Cookie
466
469
}
@@ -514,7 +517,7 @@ func (d *DuoClient) DoCallback(auth string) (err error) {
514
517
515
518
client := &http.Client{}
516
519
517
-
callbackData := "stateToken=" + d.StateToken + "&sig_response=" + sigResp
520
+
callbackData := "id=" + d.FactorID + "&stateToken=" + d.StateToken + "&sig_response=" + sigResp
518
521
req, err = http.NewRequest("POST", d.Callback, bytes.NewReader([]byte(callbackData)))
519
522
if err != nil {
520
523
return
Original file line number Diff line number Diff line change
@@ -232,7 +232,7 @@ func (o *OktaClient) AuthenticateProfile3(profileARN string, duration time.Durat
232
232
// Clear DT cookie before starting AuthN flow again. Bug #279.
233
233
o.CookieJar.SetCookies(o.BaseURL, []*http.Cookie{
234
234
{
235
-
Name: "DT",
235
+
Name: "DT",
236
236
MaxAge: -1,
237
237
},
238
238
})
@@ -412,6 +412,7 @@ func (o *OktaClient) postChallenge(payload []byte, oktaFactorProvider string, ok
412
412
Callback: f.Embedded.Verification.Links.Complete.Href,
413
413
Device: o.MFAConfig.DuoDevice,
414
414
StateToken: o.UserAuth.StateToken,
415
+
FactorID: f.Id,
415
416
}
416
417
417
418
log.Debugf("Host:%s\nSignature:%s\nStateToken:%s\n",
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4