mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-28 15:08:51 +00:00
feat: rt sessions OTP email challenge (#11941)
# Which Problems Are Solved Add OTP Email challenge needed for Create/Set session in the RT model. # How the Problems Are Solved Introduce `OTPEmailChallengeCommand` (validate/execute/events) for session creation checks Add unit tests # Additional Changes Remove unused fields from `session_challenge_otp_sms.go` # Additional Context - Related to https://github.com/zitadel/zitadel/issues/11035 --------- Co-authored-by: Marco A. <[email protected]>
This commit is contained in:
co-authored by
Marco A.
parent
9bab764796
commit
7c3d26b23b
@@ -9,15 +9,16 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
pool database.Pool
|
||||
legacyEventstore eventstore.LegacyEventstore
|
||||
sysConfig systemdefaults.SystemDefaults
|
||||
passwordHasher *crypto.Hasher
|
||||
idpEncryptionAlgo crypto.EncryptionAlgorithm
|
||||
sessionTokenDecryptor SessionTokenDecryptor
|
||||
mfaEncryptionAlgo crypto.EncryptionAlgorithm
|
||||
otpSMSSecretGeneratorConfig *crypto.GeneratorConfig
|
||||
webauthnConfig *webauthn.Config
|
||||
pool database.Pool
|
||||
legacyEventstore eventstore.LegacyEventstore
|
||||
sysConfig systemdefaults.SystemDefaults
|
||||
passwordHasher *crypto.Hasher
|
||||
idpEncryptionAlgo crypto.EncryptionAlgorithm
|
||||
sessionTokenDecryptor SessionTokenDecryptor
|
||||
mfaEncryptionAlgo crypto.EncryptionAlgorithm
|
||||
otpSMSSecretGeneratorConfig *crypto.GeneratorConfig
|
||||
otpEmailSecretGeneratorConfig *crypto.GeneratorConfig
|
||||
webauthnConfig *webauthn.Config
|
||||
)
|
||||
|
||||
func SetPool(p database.Pool) {
|
||||
@@ -48,6 +49,10 @@ func SetOTPSMSSecretGeneratorConfig(cfg *crypto.GeneratorConfig) {
|
||||
otpSMSSecretGeneratorConfig = cfg
|
||||
}
|
||||
|
||||
func SetOTPEmailSecretGeneratorConfig(cfg *crypto.GeneratorConfig) {
|
||||
otpEmailSecretGeneratorConfig = cfg
|
||||
}
|
||||
|
||||
func SetMFAEncryptionAlgorithm(mfaEncryptionAlg crypto.EncryptionAlgorithm) {
|
||||
mfaEncryptionAlgo = mfaEncryptionAlg
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user