mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 02:54:20 +00:00
ef012d0081
* 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>
22 lines
561 B
Go
22 lines
561 B
Go
package command
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/zitadel/zitadel/internal/command/preparation"
|
|
"github.com/zitadel/zitadel/internal/crypto"
|
|
"github.com/zitadel/zitadel/internal/domain"
|
|
)
|
|
|
|
type Phone struct {
|
|
Number domain.PhoneNumber
|
|
Verified bool
|
|
|
|
// ReturnCode is used if the Verified field is false
|
|
ReturnCode bool
|
|
}
|
|
|
|
func (c *Commands) newPhoneCode(ctx context.Context, filter preparation.FilterToQueryReducer, alg crypto.EncryptionAlgorithm) (*CryptoCode, error) {
|
|
return c.newCode(ctx, filter, domain.SecretGeneratorTypeVerifyPhoneCode, alg)
|
|
}
|