mirror of
https://github.com/andwati/zitadel.git
synced 2026-12-05 18:38:52 +00:00
feat: implement otp sms session challenge (#11919)
# Which Problems Are Solved This PR adds the OTP SMS Challenge needed for CreateSession API https://github.com/zitadel/zitadel/issues/11035 # How the Problems Are Solved - Introduce `OTPSMSChallengeCommand` (validate/execute/events) for session creation checks - Introduce `GetOTPCryptoGeneratorConfigWithDefault` to fetch per-instance secret generator settings - Add unit tests # Additional Changes Refactor tests in `session_check_recovery_code_test.go` to make the helper functions reusable in `session_challenge_otp_sms_test.go` # Additional Context Related to https://github.com/zitadel/zitadel/issues/11035
This commit is contained in:
@@ -57,6 +57,12 @@ func WithLockoutSettingsRepo(repo LockoutSettingsRepository) InvokeOpt {
|
||||
}
|
||||
}
|
||||
|
||||
func WithSecretGeneratorSettingsRepo(repo SecretGeneratorSettingsRepository) InvokeOpt {
|
||||
return func(opts *InvokeOpts) {
|
||||
opts.secretGeneratorSettingsRepo = repo
|
||||
}
|
||||
}
|
||||
|
||||
func WithPermissionChecker(checker PermissionChecker) InvokeOpt {
|
||||
return func(opts *InvokeOpts) {
|
||||
opts.Permissions = checker
|
||||
@@ -118,7 +124,8 @@ type InvokeOpts struct {
|
||||
idpIntentRepo IDPIntentRepository
|
||||
|
||||
// Settings repos
|
||||
lockoutSettingRepo LockoutSettingsRepository
|
||||
lockoutSettingRepo LockoutSettingsRepository
|
||||
secretGeneratorSettingsRepo SecretGeneratorSettingsRepository
|
||||
}
|
||||
|
||||
func (o *InvokeOpts) DB() database.QueryExecutor {
|
||||
|
||||
Reference in New Issue
Block a user