outpost: improved set secret answers for flow execution (#8013)

* outpost/radius: set mfa answer for noncode-based mfa

* refactor CheckPasswordInlineMFA to SetSecrets

* small style changes

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Matthias G
2024-03-15 18:05:44 +01:00
committed by GitHub
parent cf6bbbae70
commit 3f43ff22a8
3 changed files with 13 additions and 14 deletions

View File

@ -23,10 +23,7 @@ func (db *DirectBinder) Bind(username string, req *bind.Request) (ldap.LDAPResul
fe.Params.Add("goauthentik.io/outpost/ldap", "true")
fe.Answers[flow.StageIdentification] = username
fe.Answers[flow.StagePassword] = req.BindPW
if db.si.GetMFASupport() {
fe.CheckPasswordInlineMFA()
}
fe.SetSecrets(req.BindPW, db.si.GetMFASupport())
passed, err := fe.Execute()
flags := flags.UserFlags{