mirror of
https://github.com/zitadel/zitadel.git
synced 2025-02-28 23:47:24 +00:00
fix: set correct enum type for u2f and otp init (#2224)
This commit is contained in:
parent
90f1647bb9
commit
261b652b82
@ -2,11 +2,10 @@ package handler
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"github.com/caos/zitadel/internal/domain"
|
||||
"net/http"
|
||||
|
||||
http_mw "github.com/caos/zitadel/internal/api/http/middleware"
|
||||
"github.com/caos/zitadel/internal/auth_request/model"
|
||||
"github.com/caos/zitadel/internal/domain"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -15,7 +14,7 @@ const (
|
||||
|
||||
type u2fInitData struct {
|
||||
webAuthNData
|
||||
MFAType model.MFAType
|
||||
MFAType domain.MFAType
|
||||
}
|
||||
|
||||
func (l *Login) renderRegisterU2F(w http.ResponseWriter, r *http.Request, authReq *domain.AuthRequest, err error) {
|
||||
@ -35,7 +34,7 @@ func (l *Login) renderRegisterU2F(w http.ResponseWriter, r *http.Request, authRe
|
||||
userData: l.getUserData(r, authReq, "Register WebAuthNToken", errID, errMessage),
|
||||
CredentialCreationData: credentialData,
|
||||
},
|
||||
MFAType: model.MFATypeU2F,
|
||||
MFAType: domain.MFATypeU2F,
|
||||
}
|
||||
l.renderer.RenderTemplate(w, r, l.getTranslator(authReq), l.renderer.Templates[tmplMFAU2FInit], data, nil)
|
||||
}
|
||||
|
@ -13,7 +13,6 @@ import (
|
||||
"golang.org/x/text/language"
|
||||
|
||||
http_mw "github.com/caos/zitadel/internal/api/http/middleware"
|
||||
"github.com/caos/zitadel/internal/auth_request/model"
|
||||
"github.com/caos/zitadel/internal/domain"
|
||||
caos_errs "github.com/caos/zitadel/internal/errors"
|
||||
"github.com/caos/zitadel/internal/i18n"
|
||||
@ -149,7 +148,7 @@ func CreateRenderer(pathPrefix string, staticDir http.FileSystem, staticStorage
|
||||
"mfaPromptUrl": func() string {
|
||||
return path.Join(r.pathPrefix, EndpointMFAPrompt)
|
||||
},
|
||||
"mfaPromptChangeUrl": func(id string, provider model.MFAType) string {
|
||||
"mfaPromptChangeUrl": func(id string, provider domain.MFAType) string {
|
||||
return path.Join(r.pathPrefix, fmt.Sprintf("%s?%s=%s;%s=%v", EndpointMFAPrompt, queryAuthRequestID, id, "provider", provider))
|
||||
},
|
||||
"mfaInitVerifyUrl": func() string {
|
||||
|
Loading…
x
Reference in New Issue
Block a user