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