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

@ -21,10 +21,7 @@ func (rs *RadiusServer) Handle_AccessRequest(w radius.ResponseWriter, r *RadiusR
fe.Params.Add("goauthentik.io/outpost/radius", "true")
fe.Answers[flow.StageIdentification] = username
fe.Answers[flow.StagePassword] = rfc2865.UserPassword_GetString(r.Packet)
if r.pi.MFASupport {
fe.CheckPasswordInlineMFA()
}
fe.SetSecrets(rfc2865.UserPassword_GetString(r.Packet), r.pi.MFASupport)
passed, err := fe.Execute()
if err != nil {