mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:37:32 +00:00
feat: user v2 phone verification (#6309)
* feat: add phone change and code verification for user v2 api * feat: add phone change and code verification for user v2 api * fix: add ignored phone.proto * fix: integration tests * Update proto/zitadel/user/v2alpha/user_service.proto * Update idp_template.go --------- Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
@@ -149,8 +149,9 @@ func HumanPhoneVerificationFailedEventMapper(event *repository.Event) (eventstor
|
||||
type HumanPhoneCodeAddedEvent struct {
|
||||
eventstore.BaseEvent `json:"-"`
|
||||
|
||||
Code *crypto.CryptoValue `json:"code,omitempty"`
|
||||
Expiry time.Duration `json:"expiry,omitempty"`
|
||||
Code *crypto.CryptoValue `json:"code,omitempty"`
|
||||
Expiry time.Duration `json:"expiry,omitempty"`
|
||||
CodeReturned bool `json:"code_returned,omitempty"`
|
||||
}
|
||||
|
||||
func (e *HumanPhoneCodeAddedEvent) Data() interface{} {
|
||||
@@ -166,6 +167,15 @@ func NewHumanPhoneCodeAddedEvent(
|
||||
aggregate *eventstore.Aggregate,
|
||||
code *crypto.CryptoValue,
|
||||
expiry time.Duration,
|
||||
) *HumanPhoneCodeAddedEvent {
|
||||
return NewHumanPhoneCodeAddedEventV2(ctx, aggregate, code, expiry, false)
|
||||
}
|
||||
func NewHumanPhoneCodeAddedEventV2(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
code *crypto.CryptoValue,
|
||||
expiry time.Duration,
|
||||
codeReturned bool,
|
||||
) *HumanPhoneCodeAddedEvent {
|
||||
return &HumanPhoneCodeAddedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
@@ -173,8 +183,9 @@ func NewHumanPhoneCodeAddedEvent(
|
||||
aggregate,
|
||||
HumanPhoneCodeAddedType,
|
||||
),
|
||||
Code: code,
|
||||
Expiry: expiry,
|
||||
Code: code,
|
||||
Expiry: expiry,
|
||||
CodeReturned: codeReturned,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user