add MFA structs, Make Callback Public

This commit is contained in:
Samuel Lorch 2021-09-20 10:23:59 +02:00
parent 21c833b742
commit f01926b1c5
3 changed files with 17 additions and 3 deletions

View file

@ -58,8 +58,8 @@ start:
// if we are here this probably means that the MFA callback is broken, to prevent a infinit loop lets error here
return r, &res, fmt.Errorf("Got MFA challenge twice in a row, is your MFA Callback broken? Bailing to prevent loop...:")
}
if c.mfaCallback != nil {
err = c.mfaCallback(c, &res)
if c.MFACallback != nil {
err = c.MFACallback(ctx, c, &res)
if err != nil {
return r, &res, fmt.Errorf("MFA Callback: %w", err)
}