From 1aca140249f90d9fec1f63a11e73b6d0b96e2c2a Mon Sep 17 00:00:00 2001 From: Newman Chow Date: Mon, 7 Oct 2024 13:30:15 +0800 Subject: [PATCH] Update wire_gen after rebase --- pkg/auth/wire_gen.go | 590 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 478 insertions(+), 112 deletions(-) diff --git a/pkg/auth/wire_gen.go b/pkg/auth/wire_gen.go index 38200f804f0..211ed3690a4 100644 --- a/pkg/auth/wire_gen.go +++ b/pkg/auth/wire_gen.go @@ -50001,14 +50001,12 @@ func newWebAppAuthflowV2SettingsBiometricHandler(p *deps.RequestProvider) http.H Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -50445,6 +50443,18 @@ func newWebAppAuthflowV2SettingsBiometricHandler(p *deps.RequestProvider) http.H eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -50454,6 +50464,7 @@ func newWebAppAuthflowV2SettingsBiometricHandler(p *deps.RequestProvider) http.H Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -50464,6 +50475,8 @@ func newWebAppAuthflowV2SettingsBiometricHandler(p *deps.RequestProvider) http.H Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: resolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ @@ -51922,14 +51935,12 @@ func newWebAppAuthflowV2SettingsMFAHandler(p *deps.RequestProvider) http.Handler Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -52366,6 +52377,18 @@ func newWebAppAuthflowV2SettingsMFAHandler(p *deps.RequestProvider) http.Handler eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -52375,6 +52398,7 @@ func newWebAppAuthflowV2SettingsMFAHandler(p *deps.RequestProvider) http.Handler Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -52385,6 +52409,8 @@ func newWebAppAuthflowV2SettingsMFAHandler(p *deps.RequestProvider) http.Handler Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: resolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ @@ -52867,14 +52893,12 @@ func newWebAppAuthflowV2SettingsMFACreatePasswordHandler(p *deps.RequestProvider Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -53311,6 +53335,18 @@ func newWebAppAuthflowV2SettingsMFACreatePasswordHandler(p *deps.RequestProvider eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -53320,6 +53356,7 @@ func newWebAppAuthflowV2SettingsMFACreatePasswordHandler(p *deps.RequestProvider Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -53330,6 +53367,8 @@ func newWebAppAuthflowV2SettingsMFACreatePasswordHandler(p *deps.RequestProvider Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: resolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ @@ -53837,14 +53876,12 @@ func newWebAppAuthflowV2SettingsMFAPasswordHandler(p *deps.RequestProvider) http Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -54281,6 +54318,18 @@ func newWebAppAuthflowV2SettingsMFAPasswordHandler(p *deps.RequestProvider) http eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -54290,6 +54339,7 @@ func newWebAppAuthflowV2SettingsMFAPasswordHandler(p *deps.RequestProvider) http Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -54300,6 +54350,8 @@ func newWebAppAuthflowV2SettingsMFAPasswordHandler(p *deps.RequestProvider) http Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: resolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ @@ -55730,14 +55782,12 @@ func newWebAppAuthflowV2SettingsTOTPHandler(p *deps.RequestProvider) http.Handle Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -56174,6 +56224,18 @@ func newWebAppAuthflowV2SettingsTOTPHandler(p *deps.RequestProvider) http.Handle eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -56183,6 +56245,7 @@ func newWebAppAuthflowV2SettingsTOTPHandler(p *deps.RequestProvider) http.Handle Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -56193,6 +56256,8 @@ func newWebAppAuthflowV2SettingsTOTPHandler(p *deps.RequestProvider) http.Handle Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: resolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ @@ -56678,14 +56743,12 @@ func newWebAppAuthflowV2SettingsOOBOTPHandler(p *deps.RequestProvider) http.Hand Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -57122,6 +57185,18 @@ func newWebAppAuthflowV2SettingsOOBOTPHandler(p *deps.RequestProvider) http.Hand eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -57131,6 +57206,7 @@ func newWebAppAuthflowV2SettingsOOBOTPHandler(p *deps.RequestProvider) http.Hand Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -57141,6 +57217,8 @@ func newWebAppAuthflowV2SettingsOOBOTPHandler(p *deps.RequestProvider) http.Hand Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: resolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ @@ -58575,14 +58653,12 @@ func newWebAppAuthflowV2SettingsChangePasskeyHandler(p *deps.RequestProvider) ht Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -59019,6 +59095,18 @@ func newWebAppAuthflowV2SettingsChangePasskeyHandler(p *deps.RequestProvider) ht eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -59028,6 +59116,7 @@ func newWebAppAuthflowV2SettingsChangePasskeyHandler(p *deps.RequestProvider) ht Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -59038,6 +59127,8 @@ func newWebAppAuthflowV2SettingsChangePasskeyHandler(p *deps.RequestProvider) ht Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: resolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ @@ -62431,14 +62522,12 @@ func newWebAppAuthflowV2SettingsSessionsHandler(p *deps.RequestProvider) http.Ha Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -62875,6 +62964,18 @@ func newWebAppAuthflowV2SettingsSessionsHandler(p *deps.RequestProvider) http.Ha eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -62884,6 +62985,7 @@ func newWebAppAuthflowV2SettingsSessionsHandler(p *deps.RequestProvider) http.Ha Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -62894,6 +62996,8 @@ func newWebAppAuthflowV2SettingsSessionsHandler(p *deps.RequestProvider) http.Ha Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: resolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ @@ -63157,6 +63261,8 @@ func newWebAppAuthflowV2SettingsSessionsHandler(p *deps.RequestProvider) http.Ha Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: resolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store, } authorizationService := &oauth2.AuthorizationService{ @@ -65293,14 +65399,12 @@ func newWebAppAuthflowV2SettingsChangePasswordHandler(p *deps.RequestProvider) h Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -65737,6 +65841,18 @@ func newWebAppAuthflowV2SettingsChangePasswordHandler(p *deps.RequestProvider) h eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -65746,6 +65862,7 @@ func newWebAppAuthflowV2SettingsChangePasswordHandler(p *deps.RequestProvider) h Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -65756,6 +65873,8 @@ func newWebAppAuthflowV2SettingsChangePasswordHandler(p *deps.RequestProvider) h Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: resolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ @@ -69118,14 +69237,12 @@ func newWebAppAuthflowV2SettingsDeleteAccountHandler(p *deps.RequestProvider) ht Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -69562,6 +69679,18 @@ func newWebAppAuthflowV2SettingsDeleteAccountHandler(p *deps.RequestProvider) ht eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -69571,6 +69700,7 @@ func newWebAppAuthflowV2SettingsDeleteAccountHandler(p *deps.RequestProvider) ht Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -69581,6 +69711,8 @@ func newWebAppAuthflowV2SettingsDeleteAccountHandler(p *deps.RequestProvider) ht Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: resolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ @@ -71016,14 +71148,12 @@ func newWebAppAuthflowV2SettingsDeleteAccountSuccessHandler(p *deps.RequestProvi Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -71460,6 +71590,18 @@ func newWebAppAuthflowV2SettingsDeleteAccountSuccessHandler(p *deps.RequestProvi eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -71469,6 +71611,7 @@ func newWebAppAuthflowV2SettingsDeleteAccountSuccessHandler(p *deps.RequestProvi Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -71479,6 +71622,8 @@ func newWebAppAuthflowV2SettingsDeleteAccountSuccessHandler(p *deps.RequestProvi Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: resolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ @@ -71955,14 +72100,12 @@ func newWebAppAuthflowV2SettingsAdvancedSettingsHandler(p *deps.RequestProvider) Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -72399,6 +72542,18 @@ func newWebAppAuthflowV2SettingsAdvancedSettingsHandler(p *deps.RequestProvider) eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -72408,6 +72563,7 @@ func newWebAppAuthflowV2SettingsAdvancedSettingsHandler(p *deps.RequestProvider) Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -72418,6 +72574,8 @@ func newWebAppAuthflowV2SettingsAdvancedSettingsHandler(p *deps.RequestProvider) Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: resolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ @@ -154078,14 +154236,12 @@ func newWebAppAuthflowV2SettingsIdentityAddEmailHandler(p *deps.RequestProvider) Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -154522,6 +154678,18 @@ func newWebAppAuthflowV2SettingsIdentityAddEmailHandler(p *deps.RequestProvider) eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -154531,6 +154699,7 @@ func newWebAppAuthflowV2SettingsIdentityAddEmailHandler(p *deps.RequestProvider) Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -154541,6 +154710,8 @@ func newWebAppAuthflowV2SettingsIdentityAddEmailHandler(p *deps.RequestProvider) Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: resolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ @@ -155039,14 +155210,12 @@ func newWebAppAuthflowV2SettingsIdentityEditEmailHandler(p *deps.RequestProvider Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -155483,6 +155652,18 @@ func newWebAppAuthflowV2SettingsIdentityEditEmailHandler(p *deps.RequestProvider eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -155492,6 +155673,7 @@ func newWebAppAuthflowV2SettingsIdentityEditEmailHandler(p *deps.RequestProvider Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -155502,6 +155684,8 @@ func newWebAppAuthflowV2SettingsIdentityEditEmailHandler(p *deps.RequestProvider Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: resolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ @@ -155941,14 +156125,12 @@ func newWebAppAuthflowV2SettingsIdentityListEmailHandler(p *deps.RequestProvider } factory := appProvider.LoggerFactory logger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: logger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -156446,6 +156628,18 @@ func newWebAppAuthflowV2SettingsIdentityListEmailHandler(p *deps.RequestProvider eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -156455,6 +156649,7 @@ func newWebAppAuthflowV2SettingsIdentityListEmailHandler(p *deps.RequestProvider Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -156465,6 +156660,8 @@ func newWebAppAuthflowV2SettingsIdentityListEmailHandler(p *deps.RequestProvider Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: oauthclientResolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: redisStore, } sessionManager := &oauth2.SessionManager{ @@ -156952,14 +157149,12 @@ func newWebAppAuthflowV2SettingsIdentityVerifyEmailHandler(p *deps.RequestProvid Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -157396,6 +157591,18 @@ func newWebAppAuthflowV2SettingsIdentityVerifyEmailHandler(p *deps.RequestProvid eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -157405,6 +157612,7 @@ func newWebAppAuthflowV2SettingsIdentityVerifyEmailHandler(p *deps.RequestProvid Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -157415,6 +157623,8 @@ func newWebAppAuthflowV2SettingsIdentityVerifyEmailHandler(p *deps.RequestProvid Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: resolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ @@ -157857,14 +158067,12 @@ func newWebAppAuthflowV2SettingsIdentityViewEmailHandler(p *deps.RequestProvider } factory := appProvider.LoggerFactory logger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: logger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -158362,6 +158570,18 @@ func newWebAppAuthflowV2SettingsIdentityViewEmailHandler(p *deps.RequestProvider eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -158371,6 +158591,7 @@ func newWebAppAuthflowV2SettingsIdentityViewEmailHandler(p *deps.RequestProvider Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -158381,6 +158602,8 @@ func newWebAppAuthflowV2SettingsIdentityViewEmailHandler(p *deps.RequestProvider Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: oauthclientResolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: redisStore, } sessionManager := &oauth2.SessionManager{ @@ -158889,14 +159112,12 @@ func newWebAppAuthflowV2SettingsIdentityChangePrimaryEmailHandler(p *deps.Reques Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -159333,6 +159554,18 @@ func newWebAppAuthflowV2SettingsIdentityChangePrimaryEmailHandler(p *deps.Reques eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -159342,6 +159575,7 @@ func newWebAppAuthflowV2SettingsIdentityChangePrimaryEmailHandler(p *deps.Reques Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -159352,6 +159586,8 @@ func newWebAppAuthflowV2SettingsIdentityChangePrimaryEmailHandler(p *deps.Reques Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: resolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ @@ -159843,14 +160079,12 @@ func newWebAppAuthflowV2SettingsIdentityAddPhoneHandler(p *deps.RequestProvider) Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -160287,6 +160521,18 @@ func newWebAppAuthflowV2SettingsIdentityAddPhoneHandler(p *deps.RequestProvider) eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -160296,6 +160542,7 @@ func newWebAppAuthflowV2SettingsIdentityAddPhoneHandler(p *deps.RequestProvider) Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -160306,6 +160553,8 @@ func newWebAppAuthflowV2SettingsIdentityAddPhoneHandler(p *deps.RequestProvider) Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: resolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ @@ -160805,14 +161054,12 @@ func newWebAppAuthflowV2SettingsIdentityEditPhoneHandler(p *deps.RequestProvider Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -161249,6 +161496,18 @@ func newWebAppAuthflowV2SettingsIdentityEditPhoneHandler(p *deps.RequestProvider eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -161258,6 +161517,7 @@ func newWebAppAuthflowV2SettingsIdentityEditPhoneHandler(p *deps.RequestProvider Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -161268,6 +161528,8 @@ func newWebAppAuthflowV2SettingsIdentityEditPhoneHandler(p *deps.RequestProvider Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: resolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ @@ -161708,14 +161970,12 @@ func newWebAppAuthflowV2SettingsIdentityListPhoneHandler(p *deps.RequestProvider } factory := appProvider.LoggerFactory logger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: logger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -162213,6 +162473,18 @@ func newWebAppAuthflowV2SettingsIdentityListPhoneHandler(p *deps.RequestProvider eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -162222,6 +162494,7 @@ func newWebAppAuthflowV2SettingsIdentityListPhoneHandler(p *deps.RequestProvider Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -162232,6 +162505,8 @@ func newWebAppAuthflowV2SettingsIdentityListPhoneHandler(p *deps.RequestProvider Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: oauthclientResolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: redisStore, } sessionManager := &oauth2.SessionManager{ @@ -162658,14 +162933,12 @@ func newWebAppAuthflowV2SettingsIdentityViewPhoneHandler(p *deps.RequestProvider } factory := appProvider.LoggerFactory logger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: logger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -163163,6 +163436,18 @@ func newWebAppAuthflowV2SettingsIdentityViewPhoneHandler(p *deps.RequestProvider eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -163172,6 +163457,7 @@ func newWebAppAuthflowV2SettingsIdentityViewPhoneHandler(p *deps.RequestProvider Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -163182,6 +163468,8 @@ func newWebAppAuthflowV2SettingsIdentityViewPhoneHandler(p *deps.RequestProvider Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: oauthclientResolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: redisStore, } sessionManager := &oauth2.SessionManager{ @@ -163685,14 +163973,12 @@ func newWebAppAuthflowV2SettingsIdentityChangePrimaryPhoneHandler(p *deps.Reques Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -164129,6 +164415,18 @@ func newWebAppAuthflowV2SettingsIdentityChangePrimaryPhoneHandler(p *deps.Reques eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -164138,6 +164436,7 @@ func newWebAppAuthflowV2SettingsIdentityChangePrimaryPhoneHandler(p *deps.Reques Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -164148,6 +164447,8 @@ func newWebAppAuthflowV2SettingsIdentityChangePrimaryPhoneHandler(p *deps.Reques Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: resolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ @@ -164639,14 +164940,12 @@ func newWebAppAuthflowV2SettingsIdentityVerifyPhoneHandler(p *deps.RequestProvid Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -165083,6 +165382,18 @@ func newWebAppAuthflowV2SettingsIdentityVerifyPhoneHandler(p *deps.RequestProvid eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -165092,6 +165403,7 @@ func newWebAppAuthflowV2SettingsIdentityVerifyPhoneHandler(p *deps.RequestProvid Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -165102,6 +165414,8 @@ func newWebAppAuthflowV2SettingsIdentityVerifyPhoneHandler(p *deps.RequestProvid Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: resolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ @@ -165544,14 +165858,12 @@ func newWebAppAuthflowV2SettingsIdentityListUsernameHandler(p *deps.RequestProvi } factory := appProvider.LoggerFactory logger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: logger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -166049,6 +166361,18 @@ func newWebAppAuthflowV2SettingsIdentityListUsernameHandler(p *deps.RequestProvi eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -166058,6 +166382,7 @@ func newWebAppAuthflowV2SettingsIdentityListUsernameHandler(p *deps.RequestProvi Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -166068,6 +166393,8 @@ func newWebAppAuthflowV2SettingsIdentityListUsernameHandler(p *deps.RequestProvi Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: oauthclientResolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: redisStore, } sessionManager := &oauth2.SessionManager{ @@ -166499,14 +166826,12 @@ func newWebAppAuthflowV2SettingsIdentityNewUsernameHandler(p *deps.RequestProvid Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -166977,6 +167302,18 @@ func newWebAppAuthflowV2SettingsIdentityNewUsernameHandler(p *deps.RequestProvid eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -166986,6 +167323,7 @@ func newWebAppAuthflowV2SettingsIdentityNewUsernameHandler(p *deps.RequestProvid Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -167012,6 +167350,8 @@ func newWebAppAuthflowV2SettingsIdentityNewUsernameHandler(p *deps.RequestProvid Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: oauthclientResolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store5, } sessionManager := &oauth2.SessionManager{ @@ -167461,14 +167801,12 @@ func newWebAppAuthflowV2SettingsIdentityViewUsernameHandler(p *deps.RequestProvi Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -167939,6 +168277,18 @@ func newWebAppAuthflowV2SettingsIdentityViewUsernameHandler(p *deps.RequestProvi eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -167948,6 +168298,7 @@ func newWebAppAuthflowV2SettingsIdentityViewUsernameHandler(p *deps.RequestProvi Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -167974,6 +168325,8 @@ func newWebAppAuthflowV2SettingsIdentityViewUsernameHandler(p *deps.RequestProvi Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: oauthclientResolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store5, } sessionManager := &oauth2.SessionManager{ @@ -168425,14 +168778,12 @@ func newWebAppAuthflowV2SettingsIdentityEditUsernameHandler(p *deps.RequestProvi Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } + storageRedis := ratelimit.NewAppStorageRedis(appredisHandle) rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ Logger: ratelimitLogger, Storage: storageRedis, + AppID: appID, Config: rateLimitsFeatureConfig, } siweLogger := siwe2.NewLogger(factory) @@ -168903,6 +169254,18 @@ func newWebAppAuthflowV2SettingsIdentityEditUsernameHandler(p *deps.RequestProvi eventProvider := &access.EventProvider{ Store: eventStoreRedis, } + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } idpsessionRand := _wireRandValue idpsessionProvider := &idpsession.Provider{ Context: contextContext, @@ -168912,6 +169275,7 @@ func newWebAppAuthflowV2SettingsIdentityEditUsernameHandler(p *deps.RequestProvi Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, + MeterService: meterService, TrustProxy: trustProxy, Config: sessionConfig, Clock: clockClock, @@ -168938,6 +169302,8 @@ func newWebAppAuthflowV2SettingsIdentityEditUsernameHandler(p *deps.RequestProvi Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: oauthclientResolver, + AccessEvents: eventProvider, + MeterService: meterService, OfflineGrants: store5, } sessionManager := &oauth2.SessionManager{