Merge remote-tracking branch 'upstream/main' into merge-gramsrv-2965f5d
This commit is contained in:
commit
ebb0be38d9
355 changed files with 44640 additions and 2320 deletions
|
|
@ -43,6 +43,7 @@ type Service struct {
|
|||
userCache store.UserCache
|
||||
authorizations store.AuthorizationStore
|
||||
phoneChanges store.PhoneChangeStore
|
||||
lifecycle store.AccountLifecycleStore
|
||||
publicBaseURL string
|
||||
codes store.CodeStore
|
||||
phoneChangeCode string
|
||||
|
|
@ -189,6 +190,14 @@ func WithPhoneCodeDelivery(sender otpdelivery.Sender, length int) ServiceOption
|
|||
}
|
||||
}
|
||||
|
||||
// WithAccountLifecycle installs the single durable account deletion boundary.
|
||||
// It shares the already configured phone-code delivery and user cache.
|
||||
func WithAccountLifecycle(lifecycle store.AccountLifecycleStore) ServiceOption {
|
||||
return func(s *Service) {
|
||||
s.lifecycle = lifecycle
|
||||
}
|
||||
}
|
||||
|
||||
// NewService 创建 account 服务。
|
||||
func NewService(passwords store.PasswordStore, opts ...ServiceOption) *Service {
|
||||
s := &Service{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue