fix: pass necessary webauthn data through events (#1541)

This commit is contained in:
Livio Amstutz
2021-04-07 12:56:59 +02:00
committed by GitHub
parent 4d19652cd9
commit f889b85d42
5 changed files with 47 additions and 30 deletions

View File

@@ -2,8 +2,9 @@ package user
import (
"context"
"github.com/caos/zitadel/internal/eventstore"
"github.com/caos/zitadel/internal/domain"
"github.com/caos/zitadel/internal/eventstore"
"github.com/caos/zitadel/internal/eventstore/repository"
)
@@ -166,12 +167,7 @@ type HumanU2FBeginLoginEvent struct {
HumanWebAuthNBeginLoginEvent
}
func NewHumanU2FBeginLoginEvent(
ctx context.Context,
aggregate *eventstore.Aggregate,
challenge string,
info *AuthRequestInfo,
) *HumanU2FBeginLoginEvent {
func NewHumanU2FBeginLoginEvent(ctx context.Context, aggregate *eventstore.Aggregate, challenge string, allowedCredentialIDs [][]byte, userVerification domain.UserVerificationRequirement, info *AuthRequestInfo) *HumanU2FBeginLoginEvent {
return &HumanU2FBeginLoginEvent{
HumanWebAuthNBeginLoginEvent: *NewHumanWebAuthNBeginLoginEvent(
eventstore.NewBaseEventForPush(
@@ -180,6 +176,8 @@ func NewHumanU2FBeginLoginEvent(
HumanU2FTokenBeginLoginType,
),
challenge,
allowedCredentialIDs,
userVerification,
info,
),
}