2021-01-04 13:52:13 +00:00
|
|
|
package domain
|
|
|
|
|
2022-04-26 23:01:45 +00:00
|
|
|
import "github.com/zitadel/zitadel/internal/crypto"
|
2021-03-01 07:48:50 +00:00
|
|
|
|
2021-01-04 13:52:13 +00:00
|
|
|
type MFAState int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
MFAStateUnspecified MFAState = iota
|
|
|
|
MFAStateNotReady
|
|
|
|
MFAStateReady
|
2021-01-15 08:32:59 +00:00
|
|
|
MFAStateRemoved
|
2021-01-04 13:52:13 +00:00
|
|
|
|
|
|
|
stateCount
|
|
|
|
)
|
|
|
|
|
|
|
|
func (f MFAState) Valid() bool {
|
|
|
|
return f >= 0 && f < stateCount
|
|
|
|
}
|
2021-03-01 07:48:50 +00:00
|
|
|
|
|
|
|
type MultifactorConfigs struct {
|
|
|
|
OTP OTPConfig
|
|
|
|
}
|
|
|
|
|
|
|
|
type OTPConfig struct {
|
|
|
|
Issuer string
|
|
|
|
CryptoMFA crypto.EncryptionAlgorithm
|
|
|
|
}
|