fix: ensure event order in setDefaultAuthFactorsInCustomLoginPolicy (for testability) (#1595)

* fix: ensure event order (for testability)

* fix: error handling (incl. imports of wrong pkgs)
This commit is contained in:
Livio Amstutz
2021-04-15 15:30:19 +02:00
committed by GitHub
parent 8fccd7c495
commit b0681a0bbe
6 changed files with 36 additions and 19 deletions

View File

@@ -10,6 +10,14 @@ const (
secondFactorCount
)
func SecondFactorTypes() []SecondFactorType {
types := make([]SecondFactorType, 0, secondFactorCount-1)
for i := SecondFactorTypeUnspecified + 1; i < secondFactorCount; i++ {
types = append(types, i)
}
return types
}
type MultiFactorType int32
const (
@@ -19,6 +27,14 @@ const (
multiFactorCount
)
func MultiFactorTypes() []MultiFactorType {
types := make([]MultiFactorType, 0, multiFactorCount-1)
for i := MultiFactorTypeUnspecified + 1; i < multiFactorCount; i++ {
types = append(types, i)
}
return types
}
type FactorState int32
const (