mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-15 12:27:59 +00:00
14e2aba1bc
# Which Problems Are Solved Twilio supports a robust, multi-channel verification service that notably supports multi-region SMS sender numbers required for our use case. Currently, Zitadel does much of the work of the Twilio Verify (eg. localization, code generation, messaging) but doesn't support the pool of sender numbers that Twilio Verify does. # How the Problems Are Solved To support this API, we need to be able to store the Twilio Service ID and send that in a verification request where appropriate: phone number verification and SMS 2FA code paths. This PR does the following: - Adds the ability to use Twilio Verify of standard messaging through Twilio - Adds support for international numbers and more reliable verification messages sent from multiple numbers - Adds a new Twilio configuration option to support Twilio Verify in the admin console - Sends verification SMS messages through Twilio Verify - Implements Twilio Verification Checks for codes generated through the same # Additional Changes # Additional Context - base was implemented by @zhirschtritt in https://github.com/zitadel/zitadel/pull/8268 ❤️ - closes https://github.com/zitadel/zitadel/issues/8581 --------- Co-authored-by: Zachary Hirschtritt <zachary.hirschtritt@klaviyo.com> Co-authored-by: Joey Biscoglia <joey.biscoglia@klaviyo.com>
54 lines
1.6 KiB
Go
54 lines
1.6 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: github.com/zitadel/zitadel/internal/notification/senders (interfaces: CodeGenerator)
|
|
//
|
|
// Generated by this command:
|
|
//
|
|
// mockgen -package mock -destination ./mock/code_generator.mock.go github.com/zitadel/zitadel/internal/notification/senders CodeGenerator
|
|
//
|
|
|
|
// Package mock is a generated GoMock package.
|
|
package mock
|
|
|
|
import (
|
|
reflect "reflect"
|
|
|
|
gomock "go.uber.org/mock/gomock"
|
|
)
|
|
|
|
// MockCodeGenerator is a mock of CodeGenerator interface.
|
|
type MockCodeGenerator struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockCodeGeneratorMockRecorder
|
|
}
|
|
|
|
// MockCodeGeneratorMockRecorder is the mock recorder for MockCodeGenerator.
|
|
type MockCodeGeneratorMockRecorder struct {
|
|
mock *MockCodeGenerator
|
|
}
|
|
|
|
// NewMockCodeGenerator creates a new mock instance.
|
|
func NewMockCodeGenerator(ctrl *gomock.Controller) *MockCodeGenerator {
|
|
mock := &MockCodeGenerator{ctrl: ctrl}
|
|
mock.recorder = &MockCodeGeneratorMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockCodeGenerator) EXPECT() *MockCodeGeneratorMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// VerifyCode mocks base method.
|
|
func (m *MockCodeGenerator) VerifyCode(arg0, arg1 string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "VerifyCode", arg0, arg1)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// VerifyCode indicates an expected call of VerifyCode.
|
|
func (mr *MockCodeGeneratorMockRecorder) VerifyCode(arg0, arg1 any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyCode", reflect.TypeOf((*MockCodeGenerator)(nil).VerifyCode), arg0, arg1)
|
|
}
|