mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-29 23:48:52 +00:00
feat: enable otp email and sms (#6260)
* feat: enable otp email and sms * feat: enable otp factors in login settings * remove tests without value * translate second factors * don't add new factors yet * add comment * add factors to docs * backward compatible settings api * compile tests * add available 2fa types * test: add mapping tests --------- Co-authored-by: Livio Spring <[email protected]>
This commit is contained in:
co-authored by
Livio Spring
parent
d3e403f645
commit
31ec1d83b9
@@ -115,11 +115,11 @@ func (p *loginPolicyProjection) reducers() []handler.AggregateReducer {
|
||||
},
|
||||
{
|
||||
Event: org.LoginPolicySecondFactorAddedEventType,
|
||||
Reduce: p.reduce2FAAdded,
|
||||
Reduce: p.reduceSecondFactorAdded,
|
||||
},
|
||||
{
|
||||
Event: org.LoginPolicySecondFactorRemovedEventType,
|
||||
Reduce: p.reduce2FARemoved,
|
||||
Reduce: p.reduceSecondFactorRemoved,
|
||||
},
|
||||
{
|
||||
Event: org.OrgRemovedEventType,
|
||||
@@ -148,11 +148,11 @@ func (p *loginPolicyProjection) reducers() []handler.AggregateReducer {
|
||||
},
|
||||
{
|
||||
Event: instance.LoginPolicySecondFactorAddedEventType,
|
||||
Reduce: p.reduce2FAAdded,
|
||||
Reduce: p.reduceSecondFactorAdded,
|
||||
},
|
||||
{
|
||||
Event: instance.LoginPolicySecondFactorRemovedEventType,
|
||||
Reduce: p.reduce2FARemoved,
|
||||
Reduce: p.reduceSecondFactorRemoved,
|
||||
},
|
||||
{
|
||||
Event: instance.InstanceRemovedEventType,
|
||||
@@ -345,7 +345,7 @@ func (p *loginPolicyProjection) reduceLoginPolicyRemoved(event eventstore.Event)
|
||||
), nil
|
||||
}
|
||||
|
||||
func (p *loginPolicyProjection) reduce2FAAdded(event eventstore.Event) (*handler.Statement, error) {
|
||||
func (p *loginPolicyProjection) reduceSecondFactorAdded(event eventstore.Event) (*handler.Statement, error) {
|
||||
var policyEvent policy.SecondFactorAddedEvent
|
||||
switch e := event.(type) {
|
||||
case *instance.LoginPolicySecondFactorAddedEvent:
|
||||
@@ -370,7 +370,7 @@ func (p *loginPolicyProjection) reduce2FAAdded(event eventstore.Event) (*handler
|
||||
), nil
|
||||
}
|
||||
|
||||
func (p *loginPolicyProjection) reduce2FARemoved(event eventstore.Event) (*handler.Statement, error) {
|
||||
func (p *loginPolicyProjection) reduceSecondFactorRemoved(event eventstore.Event) (*handler.Statement, error) {
|
||||
var policyEvent policy.SecondFactorRemovedEvent
|
||||
switch e := event.(type) {
|
||||
case *instance.LoginPolicySecondFactorRemovedEvent:
|
||||
|
||||
Reference in New Issue
Block a user