deps

package
v0.0.0-...-c4f7e29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 94 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppRootDeps = wire.NewSet(
	rootDeps,
	wire.FieldsOf(new(*AppProvider),
		"RootProvider",
		"LoggerFactory",
		"AppDatabase",
		"AuditReadDatabase",
		"AuditWriteDatabase",
		"Redis",
		"GlobalRedis",
		"AnalyticRedis",
		"TaskQueue",
		"AppContext",
	),
	wire.FieldsOf(new(*config.AppContext),
		"Resources",
		"Config",
		"Domains",
	),

	wire.Bind(new(event.Database), new(*appdb.Handle)),
	wire.Bind(new(workflow.ServiceDatabase), new(*appdb.Handle)),
	wire.Bind(new(authenticationflow.ServiceDatabase), new(*appdb.Handle)),
	wire.Bind(new(template.ResourceManager), new(*resource.Manager)),
	wire.Bind(new(loginid.ResourceManager), new(*resource.Manager)),
	wire.Bind(new(web.ResourceManager), new(*resource.Manager)),
	wire.Bind(new(web.EmbeddedResourceManager), new(*web.GlobalEmbeddedResourceManager)),
	wire.Bind(new(hook.ResourceManager), new(*resource.Manager)),
)
View Source
var BackgroundDependencySet = wire.NewSet(
	wire.FieldsOf(new(*BackgroundProvider),
		"EnvironmentConfig",
		"ConfigSourceConfig",
		"LoggerFactory",
		"SentryHub",
		"DatabasePool",
		"RedisPool",
		"RedisHub",
		"BaseResources",
		"EmbeddedResources",
	),

	envConfigDeps,

	clock.DependencySet,
	globaldb.DependencySet,
)
View Source
var CommonDependencySet = wire.NewSet(
	ConfigDeps,
	utilsDeps,

	appdb.DependencySet,
	auditdb.DependencySet,
	template.DependencySet,

	healthz.DependencySet,

	wire.NewSet(
		authenticationinfo.DependencySet,
		wire.Bind(new(interaction.AuthenticationInfoService), new(*authenticationinfo.StoreRedis)),
		wire.Bind(new(workflow.AuthenticationInfoService), new(*authenticationinfo.StoreRedis)),
		wire.Bind(new(authenticationflow.AuthenticationInfoService), new(*authenticationinfo.StoreRedis)),
		wire.Bind(new(oauthhandler.AuthenticationInfoService), new(*authenticationinfo.StoreRedis)),
	),

	wire.NewSet(
		oauthsession.DependencySet,
		wire.Bind(new(oauthhandler.OAuthSessionService), new(*oauthsession.StoreRedis)),
		wire.Bind(new(interaction.OAuthSessions), new(*oauthsession.StoreRedis)),
	),

	wire.NewSet(
		libes.DependencySet,
		wire.Bind(new(userimport.ElasticsearchService), new(*libes.Service)),
	),

	wire.NewSet(
		challenge.DependencySet,
		wire.Bind(new(interaction.ChallengeProvider), new(*challenge.Provider)),
		wire.Bind(new(oauthhandler.ChallengeProvider), new(*challenge.Provider)),
		wire.Bind(new(authenticationflow.ChallengeService), new(*challenge.Provider)),
	),

	wire.NewSet(
		event.DependencySet,
		wire.Bind(new(interaction.EventService), new(*event.Service)),
		wire.Bind(new(workflow.EventService), new(*event.Service)),
		wire.Bind(new(authenticationflow.EventService), new(*event.Service)),
		wire.Bind(new(user.EventService), new(*event.Service)),
		wire.Bind(new(session.EventService), new(*event.Service)),
		wire.Bind(new(messaging.EventService), new(*event.Service)),
		wire.Bind(new(featurestdattrs.EventService), new(*event.Service)),
		wire.Bind(new(featurecustomattrs.EventService), new(*event.Service)),
		wire.Bind(new(facade.EventService), new(*event.Service)),
		wire.Bind(new(oauthhandler.EventService), new(*event.Service)),
		wire.Bind(new(oauth.EventService), new(*event.Service)),
	),

	wire.NewSet(
		hook.DependencySet,
	),

	wire.NewSet(
		audit.DependencySet,
	),

	wire.NewSet(
		idpsession.DependencySet,

		wire.Bind(new(session.IDPSessionResolver), new(*idpsession.Resolver)),
		wire.Bind(new(session.IDPSessionManager), new(*idpsession.Manager)),
		wire.Bind(new(oauth.ResolverSessionProvider), new(*idpsession.Provider)),
		wire.Bind(new(oauth.ServiceIDPSessionProvider), new(*idpsession.Provider)),
		wire.Bind(new(oidc.IDTokenHintResolverSessionProvider), new(*idpsession.Provider)),
		wire.Bind(new(interaction.SessionProvider), new(*idpsession.Provider)),
		wire.Bind(new(workflow.IDPSessionService), new(*idpsession.Provider)),
		wire.Bind(new(authenticationflow.IDPSessionService), new(*idpsession.Provider)),
		wire.Bind(new(sessionlisting.IDPSessionProvider), new(*idpsession.Provider)),
		wire.Bind(new(facade.IDPSessionManager), new(*idpsession.Manager)),
	),

	wire.NewSet(
		access.DependencySet,
		session.DependencySet,
		wire.Bind(new(idpsession.AccessEventProvider), new(*access.EventProvider)),
		wire.Bind(new(oidchandler.LogoutSessionManager), new(*session.Manager)),
		wire.Bind(new(oauthhandler.SessionManager), new(*session.Manager)),
		wire.Bind(new(interaction.SessionManager), new(*session.Manager)),
		wire.Bind(new(workflow.SessionService), new(*session.Manager)),
		wire.Bind(new(authenticationflow.SessionService), new(*session.Manager)),
	),

	wire.NewSet(
		authenticatorpassword.DependencySet,
		wire.Bind(new(facade.PasswordHistoryStore), new(*authenticatorpassword.HistoryStore)),
		authenticatoroob.DependencySet,
		authenticatortotp.DependencySet,
		authenticatorpasskey.DependencySet,

		authenticatorservice.DependencySet,
		wire.Bind(new(authenticatorservice.PasswordAuthenticatorProvider), new(*authenticatorpassword.Provider)),
		wire.Bind(new(authenticatorservice.PasskeyAuthenticatorProvider), new(*authenticatorpasskey.Provider)),
		wire.Bind(new(authenticatorservice.OOBOTPAuthenticatorProvider), new(*authenticatoroob.Provider)),
		wire.Bind(new(authenticatorservice.TOTPAuthenticatorProvider), new(*authenticatortotp.Provider)),

		wire.Bind(new(facade.AuthenticatorService), new(*authenticatorservice.Service)),
		wire.Bind(new(user.AuthenticatorService), new(*authenticatorservice.Service)),
	),

	wire.NewSet(
		mfa.DependencySet,

		wire.Bind(new(facade.MFAService), new(*mfa.Service)),
	),

	wire.NewSet(
		stdattrs.DependencySet,
		wire.Bind(new(sso.StandardAttributesNormalizer), new(*stdattrs.Normalizer)),
	),

	wire.NewSet(
		featurecustomattrs.DependencySet,
		wire.Bind(new(user.CustomAttributesService), new(*featurecustomattrs.ServiceNoEvent)),
		wire.Bind(new(hook.CustomAttributesServiceNoEvent), new(*featurecustomattrs.ServiceNoEvent)),
		wire.Bind(new(workflow.CustomAttrsService), new(*featurecustomattrs.Service)),
		wire.Bind(new(authenticationflow.CustomAttrsService), new(*featurecustomattrs.Service)),
		wire.Bind(new(userimport.CustomAttributesService), new(*featurecustomattrs.ServiceNoEvent)),
	),

	wire.NewSet(
		identityloginid.DependencySet,
		wire.Bind(new(stdattrs.LoginIDNormalizerFactory), new(*identityloginid.NormalizerFactory)),
		wire.Bind(new(authenticatoroob.LoginIDNormalizerFactory), new(*identityloginid.NormalizerFactory)),

		identityoauth.DependencySet,

		identityanonymous.DependencySet,
		wire.Bind(new(interaction.AnonymousIdentityProvider), new(*identityanonymous.Provider)),
		wire.Bind(new(interaction.AnonymousUserPromotionCodeStore), new(*identityanonymous.StoreRedis)),
		wire.Bind(new(authenticationflow.AnonymousIdentityService), new(*identityanonymous.Provider)),
		wire.Bind(new(authenticationflow.AnonymousUserPromotionCodeStore), new(*identityanonymous.StoreRedis)),

		identitypasskey.DependencySet,

		identitybiometric.DependencySet,
		wire.Bind(new(interaction.BiometricIdentityProvider), new(*identitybiometric.Provider)),

		identitysiwe.DependencySet,

		identityservice.DependencySet,
		wire.Bind(new(identityservice.LoginIDIdentityProvider), new(*identityloginid.Provider)),
		wire.Bind(new(identityservice.OAuthIdentityProvider), new(*identityoauth.Provider)),
		wire.Bind(new(identityservice.PasskeyIdentityProvider), new(*identitypasskey.Provider)),
		wire.Bind(new(identityservice.AnonymousIdentityProvider), new(*identityanonymous.Provider)),
		wire.Bind(new(identityservice.BiometricIdentityProvider), new(*identitybiometric.Provider)),
		wire.Bind(new(identityservice.SIWEIdentityProvider), new(*identitysiwe.Provider)),

		wire.Bind(new(facade.IdentityService), new(*identityservice.Service)),
		wire.Bind(new(user.IdentityService), new(*identityservice.Service)),
		wire.Bind(new(featurestdattrs.IdentityService), new(*identityservice.Service)),
		wire.Bind(new(featurepasskey.IdentityService), new(*identityservice.Service)),

		wire.Bind(new(oauthhandler.PromotionCodeStore), new(*identityanonymous.StoreRedis)),
		wire.Bind(new(oauthhandler.AnonymousIdentityProvider), new(*identityanonymous.Provider)),
	),

	wire.NewSet(
		facade.DependencySet,

		wire.Bind(new(interaction.IdentityService), new(facade.IdentityFacade)),
		wire.Bind(new(interaction.AuthenticatorService), new(facade.AuthenticatorFacade)),
		wire.Bind(new(workflow.AuthenticatorService), new(facade.AuthenticatorFacade)),
		wire.Bind(new(authenticationflow.AuthenticatorService), new(facade.AuthenticatorFacade)),
		wire.Bind(new(forgotpassword.AuthenticatorService), new(facade.AuthenticatorFacade)),
		wire.Bind(new(forgotpassword.IdentityService), new(facade.IdentityFacade)),
		wire.Bind(new(workflow.IdentityService), new(facade.IdentityFacade)),
		wire.Bind(new(workflow.VerificationService), new(facade.WorkflowVerificationFacade)),
		wire.Bind(new(workflow.MFAService), new(*facade.MFAFacade)),
		wire.Bind(new(authenticationflow.IdentityService), new(facade.IdentityFacade)),
		wire.Bind(new(authenticationflow.VerificationService), new(facade.WorkflowVerificationFacade)),
		wire.Bind(new(authenticationflow.MFAService), new(*facade.MFAFacade)),
		wire.Bind(new(interaction.MFAService), new(*facade.MFAFacade)),
		wire.Bind(new(userimport.IdentityService), new(*facade.IdentityFacade)),
		wire.Bind(new(userimport.AuthenticatorService), new(*facade.AuthenticatorFacade)),
	),

	wire.NewSet(
		user.DependencySet,
		wire.Bind(new(session.UserQuery), new(*user.Queries)),
		wire.Bind(new(interaction.UserService), new(*user.Provider)),
		wire.Bind(new(workflow.UserService), new(*user.Provider)),
		wire.Bind(new(authenticationflow.UserService), new(*user.Provider)),
		wire.Bind(new(oidc.UserProvider), new(*user.Queries)),
		wire.Bind(new(featurestdattrs.UserQueries), new(*user.RawQueries)),
		wire.Bind(new(featurestdattrs.UserStore), new(*user.Store)),
		wire.Bind(new(featurecustomattrs.UserStore), new(*user.Store)),
		wire.Bind(new(featurecustomattrs.UserQueries), new(*user.RawQueries)),
		wire.Bind(new(featurepasskey.UserService), new(*user.Queries)),
		wire.Bind(new(facade.UserCommands), new(*user.Commands)),
		wire.Bind(new(facade.UserQueries), new(*user.Queries)),
		wire.Bind(new(facade.UserProvider), new(*user.Provider)),
		wire.Bind(new(oauthhandler.TokenHandlerUserFacade), new(*user.Queries)),
		wire.Bind(new(oauthhandler.UserProvider), new(*user.Queries)),
		wire.Bind(new(event.ResolverUserQueries), new(*user.Queries)),
		wire.Bind(new(libes.UserQueries), new(*user.Queries)),
		wire.Bind(new(userimport.UserCommands), new(*user.RawCommands)),
		wire.Bind(new(userimport.UserQueries), new(*user.RawQueries)),
	),

	wire.NewSet(
		rolesgroups.DependencySet,
		wire.Bind(new(facade.RolesGroupsCommands), new(*rolesgroups.Commands)),
		wire.Bind(new(oidc.RolesAndGroupsProvider), new(*rolesgroups.Queries)),
		wire.Bind(new(hook.RolesAndGroupsServiceNoEvent), new(*rolesgroups.Commands)),
		wire.Bind(new(user.RolesAndGroupsService), new(*rolesgroups.Queries)),
		wire.Bind(new(userimport.RolesGroupsCommands), new(*rolesgroups.Commands)),
	),

	wire.NewSet(
		sso.DependencySet,
		wire.Bind(new(interaction.OAuthProviderFactory), new(*sso.OAuthProviderFactory)),
		wire.Bind(new(authenticationflow.OAuthProviderFactory), new(*sso.OAuthProviderFactory)),
	),

	wire.NewSet(
		forgotpassword.DependencySet,
		wire.Bind(new(interaction.ForgotPasswordService), new(*forgotpassword.Service)),
		wire.Bind(new(interaction.ResetPasswordService), new(*forgotpassword.Service)),
		wire.Bind(new(workflow.ForgotPasswordService), new(*forgotpassword.Service)),
		wire.Bind(new(authenticationflow.ForgotPasswordService), new(*forgotpassword.Service)),
		wire.Bind(new(workflow.ResetPasswordService), new(*forgotpassword.Service)),
		wire.Bind(new(authenticationflow.ResetPasswordService), new(*forgotpassword.Service)),
	),

	wire.NewSet(
		captcha.DependencySet,
		wire.Bind(new(workflow.CaptchaService), new(*captcha.Provider)),
		wire.Bind(new(authenticationflow.CaptchaService), new(*captcha.Provider)),
	),

	wire.NewSet(
		oauthpq.DependencySet,
		wire.Bind(new(oauth.AuthorizationStore), new(*oauthpq.AuthorizationStore)),
		wire.Bind(new(facade.OAuthService), new(*oauthpq.AuthorizationStore)),

		oauthredis.DependencySet,
		wire.Bind(new(oauth.AccessGrantStore), new(*oauthredis.Store)),
		wire.Bind(new(oauth.CodeGrantStore), new(*oauthredis.Store)),
		wire.Bind(new(oauth.OfflineGrantStore), new(*oauthredis.Store)),
		wire.Bind(new(oauth.AppSessionTokenStore), new(*oauthredis.Store)),
		wire.Bind(new(oauth.AppSessionStore), new(*oauthredis.Store)),
		wire.Bind(new(oauth.SettingsActionGrantStore), new(*oauthredis.Store)),

		oauth.DependencySet,
		wire.Bind(new(session.AccessTokenSessionResolver), new(*oauth.Resolver)),
		wire.Bind(new(session.AccessTokenSessionManager), new(*oauth.SessionManager)),
		wire.Bind(new(facade.OAuthSessionManager), new(*oauth.SessionManager)),
		wire.Bind(new(oauthhandler.AppSessionTokenService), new(*oauth.AppSessionTokenService)),
		wire.Bind(new(sessionlisting.OfflineGrantService), new(*oauth.OfflineGrantService)),
		wire.Value(oauthhandler.TokenGenerator(oauth.GenerateToken)),
		wire.Bind(new(oauthhandler.AuthorizationService), new(*oauth.AuthorizationService)),
		wire.Bind(new(interaction.OfflineGrantStore), new(*oauthredis.Store)),
		wire.Bind(new(workflow.OfflineGrantStore), new(*oauthredis.Store)),
		wire.Bind(new(authenticationflow.OfflineGrantStore), new(*oauthredis.Store)),
		wire.Bind(new(oidc.UIInfoResolverPromptResolver), new(*oauth.PromptResolver)),

		oauthhandler.DependencySet,

		oidc.DependencySet,
		wire.Value(oauthhandler.ScopesValidator(oidc.ValidateScopes)),
		wire.Bind(new(oauthhandler.UIInfoResolver), new(*oidc.UIInfoResolver)),
		wire.Bind(new(webapp.SelectAccountUIInfoResolver), new(*oidc.UIInfoResolver)),
		wire.Bind(new(handlerwebappauthflowv2.SelectAccountUIInfoResolver), new(*oidc.UIInfoResolver)),
		wire.Bind(new(workflow.ServiceUIInfoResolver), new(*oidc.UIInfoResolver)),
		wire.Bind(new(authenticationflow.ServiceUIInfoResolver), new(*oidc.UIInfoResolver)),
		wire.Bind(new(authenticationflow.IDTokenService), new(*oidc.IDTokenIssuer)),
		wire.Bind(new(oauthhandler.IDTokenIssuer), new(*oidc.IDTokenIssuer)),
		wire.Bind(new(oauthhandler.AccessTokenIssuer), new(*oauth.AccessTokenEncoding)),
		wire.Bind(new(oauth.UserClaimsProvider), new(*oidc.IDTokenIssuer)),
		wire.Bind(new(oauthhandler.UIURLBuilder), new(*oidc.UIURLBuilder)),

		oidchandler.DependencySet,
	),

	wire.NewSet(
		interaction.DependencySet,
		wire.Bind(new(oauthhandler.GraphService), new(*interaction.Service)),
	),

	wire.NewSet(
		verification.DependencySet,
		wire.Bind(new(featurestdattrs.ClaimStore), new(*verification.StorePQ)),
		wire.Bind(new(user.VerificationService), new(*verification.Service)),
		wire.Bind(new(facade.VerificationService), new(*verification.Service)),
		wire.Bind(new(interaction.VerificationService), new(*verification.Service)),
		wire.Bind(new(userimport.VerifiedClaimService), new(*verification.Service)),
	),

	wire.NewSet(
		otp.DependencySet,
		wire.Bind(new(authenticatorservice.OTPCodeService), new(*otp.Service)),
		wire.Bind(new(interaction.OTPCodeService), new(*otp.Service)),
		wire.Bind(new(workflow.OTPCodeService), new(*otp.Service)),
		wire.Bind(new(authenticationflow.OTPCodeService), new(*otp.Service)),
		wire.Bind(new(webapp.OTPCodeService), new(*otp.Service)),
		wire.Bind(new(forgotpassword.OTPCodeService), new(*otp.Service)),
		wire.Bind(new(interaction.OTPSender), new(*otp.MessageSender)),
		wire.Bind(new(workflow.OTPSender), new(*otp.MessageSender)),
		wire.Bind(new(authenticationflow.OTPSender), new(*otp.MessageSender)),
		wire.Bind(new(forgotpassword.OTPSender), new(*otp.MessageSender)),
	),

	wire.NewSet(
		infrawhatsapp.DependencySet,
		wire.Bind(new(otp.WhatsappService), new(*infrawhatsapp.Service)),
	),

	wire.NewSet(
		translation.DependencySet,
		wire.Bind(new(otp.TranslationService), new(*translation.Service)),
		wire.Bind(new(featurepasskey.TranslationService), new(*translation.Service)),
	),

	wire.NewSet(
		web.DependencySet,
		wire.Bind(new(translation.StaticAssetResolver), new(*web.StaticAssetResolver)),
	),

	wire.NewSet(
		ratelimit.DependencySet,
		wire.Bind(new(interaction.RateLimiter), new(*ratelimit.Limiter)),
		wire.Bind(new(workflow.RateLimiter), new(*ratelimit.Limiter)),
		wire.Bind(new(authenticationflow.RateLimiter), new(*ratelimit.Limiter)),
		wire.Bind(new(authenticatorservice.RateLimiter), new(*ratelimit.Limiter)),
		wire.Bind(new(otp.RateLimiter), new(*ratelimit.Limiter)),
		wire.Bind(new(messaging.RateLimiter), new(*ratelimit.Limiter)),
		wire.Bind(new(mfa.RateLimiter), new(*ratelimit.Limiter)),
		wire.Bind(new(featuresiwe.RateLimiter), new(*ratelimit.Limiter)),
	),

	wire.NewSet(
		lockout.DependencySet,
		wire.Bind(new(authenticatorservice.LockoutProvider), new(*lockout.Service)),
		wire.Bind(new(mfa.LockoutProvider), new(*lockout.Service)),
	),

	wire.NewSet(
		meter.DependencySet,
		wire.Bind(new(session.MeterService), new(*meter.Service)),
	),

	wire.NewSet(
		featurestdattrs.DependencySet,
		wire.Bind(new(user.StandardAttributesService), new(*featurestdattrs.ServiceNoEvent)),
		wire.Bind(new(facade.StdAttrsService), new(*featurestdattrs.Service)),
		wire.Bind(new(interaction.StdAttrsService), new(*featurestdattrs.Service)),
		wire.Bind(new(workflow.StdAttrsService), new(*featurestdattrs.Service)),
		wire.Bind(new(authenticationflow.StdAttrsService), new(*featurestdattrs.Service)),
		wire.Bind(new(hook.StandardAttributesServiceNoEvent), new(*featurestdattrs.ServiceNoEvent)),
		wire.Bind(new(userimport.StandardAttributesService), new(*featurestdattrs.ServiceNoEvent)),
	),

	presign.DependencySet,

	tutorial.DependencySet,

	sessionlisting.DependencySet,

	wire.NewSet(
		usage.DependencySet,
		wire.Bind(new(messaging.UsageLimiter), new(*usage.Limiter)),
	),

	wire.NewSet(
		sms.DependencySet,
	),

	wire.NewSet(
		messaging.DependencySet,
		wire.Bind(new(otp.Sender), new(*messaging.Sender)),
	),

	wire.NewSet(
		infracaptcha.DependencySet,
	),

	wire.NewSet(
		featurepasskey.DependencySet,
		wire.Bind(new(identitypasskey.PasskeyService), new(*featurepasskey.Service)),
		wire.Bind(new(authenticatorpasskey.PasskeyService), new(*featurepasskey.Service)),
		wire.Bind(new(interaction.PasskeyService), new(*featurepasskey.Service)),
		wire.Bind(new(authenticationflow.PasskeyRequestOptionsService), new(*featurepasskey.RequestOptionsService)),
		wire.Bind(new(authenticationflow.PasskeyCreationOptionsService), new(*featurepasskey.CreationOptionsService)),
		wire.Bind(new(authenticationflow.PasskeyService), new(*featurepasskey.Service)),
	),

	wire.NewSet(
		featuresiwe.DependencySet,
		wire.Bind(new(identitysiwe.SIWEService), new(*featuresiwe.Service)),
	),

	wire.NewSet(
		featureweb3.DependencySet,
		wire.Bind(new(user.Web3Service), new(*featureweb3.Service)),
	),

	wire.NewSet(
		workflow.DependencySet,
	),

	wire.NewSet(
		authenticationflow.DependencySet,
	),

	wire.NewSet(
		accountmigration.DependencySet,
		wire.Bind(new(workflow.AccountMigrationService), new(*accountmigration.Service)),
		wire.Bind(new(authenticationflow.AccountMigrationService), new(*accountmigration.Service)),
	),

	wire.NewSet(
		app2app.DependencySet,
		wire.Bind(new(oauthhandler.App2AppService), new(*app2app.Provider)),
	),

	wire.NewSet(
		tester.DependencySet,
		wire.Bind(new(webapp.TesterService), new(*tester.TesterStore)),
	),

	wire.NewSet(
		oauthclient.DependencySet,
		wire.Bind(new(oauthhandler.OAuthClientResolver), new(*oauthclient.Resolver)),
		wire.Bind(new(oidc.UIInfoClientResolver), new(*oauthclient.Resolver)),
		wire.Bind(new(webapp.WebappOAuthClientResolver), new(*oauthclient.Resolver)),
		wire.Bind(new(interaction.OAuthClientResolver), new(*oauthclient.Resolver)),
		wire.Bind(new(oauth.OAuthClientResolver), new(*oauthclient.Resolver)),
		wire.Bind(new(authenticationflow.OAuthClientResolver), new(*oauthclient.Resolver)),
	),

	userimport.DependencySet,

	wire.NewSet(
		endpoints.DependencySet,
		wire.Bind(new(oauth.BaseURLProvider), new(*endpoints.Endpoints)),
		wire.Bind(new(oauth.EndpointsProvider), new(*endpoints.Endpoints)),
		wire.Bind(new(oidc.BaseURLProvider), new(*endpoints.Endpoints)),
		wire.Bind(new(oidc.EndpointsProvider), new(*endpoints.Endpoints)),
		wire.Bind(new(oidc.UIURLBuilderAuthUIEndpointsProvider), new(*endpoints.Endpoints)),
		wire.Bind(new(otp.EndpointsProvider), new(*endpoints.Endpoints)),
		wire.Bind(new(tester.EndpointsProvider), new(*endpoints.Endpoints)),
		wire.Bind(new(interaction.OAuthRedirectURIBuilder), new(*endpoints.Endpoints)),
	),

	wire.NewSet(
		redisqueue.ProducerDependencySet,
		wire.Bind(new(libes.UserReindexCreateProducer), new(*redisqueue.UserReindexProducer)),
	),
)
View Source
var ConfigDeps = wire.NewSet(
	wire.FieldsOf(new(*config.Config), "AppConfig", "SecretConfig", "FeatureConfig"),
	wire.FieldsOf(new(*config.AppConfig),
		"ID",
		"HTTP",
		"Hook",
		"UI",
		"Localization",
		"Messaging",
		"Authentication",
		"Session",
		"OAuth",
		"Identity",
		"Authenticator",
		"UserProfile",
		"ForgotPassword",
		"Verification",
		"AccountDeletion",
		"AccountAnonymization",
		"Web3",
		"GoogleTagManager",
		"AccountMigration",
		"Captcha",
		"TestMode",
		"AuthenticationFlow",
	),
	wire.FieldsOf(new(*config.AuthenticationConfig),
		"Lockout",
	),
	wire.FieldsOf(new(*config.IdentityConfig),
		"LoginID",
		"OAuth",
		"Biometric",
		"OnConflict",
	),
	wire.FieldsOf(new(*config.MessagingConfig),
		"Whatsapp",
		"RateLimits",
	),
	wire.FieldsOf(new(*config.AuthenticatorConfig),
		"Password",
		"TOTP",
		"OOB",
	),
	wire.FieldsOf(new(*config.AccountMigrationConfig),
		"Hook",
	),
	wire.FieldsOf(new(*config.FeatureConfig),
		"Identity",
		"Authenticator",
		"UI",
		"OAuth",
		"AuditLog",
		"Collaborator",
		"RateLimits",
		"Messaging",
		"AdminAPI",
		"TestMode",
	),
	wire.FieldsOf(new(*config.TestModeConfig),
		"FixedOOBOTP",
		"SMS",
		"Whatsapp",
		"Email",
	),
	ProvideDefaultLanguageTag,
	ProvideSupportedLanguageTags,
	ProvideTestModeEmailSuppressed,
	ProvideTestModeSMSSuppressed,
	ProvideTestModeWhatsappSuppressed,
	secretDeps,
)
View Source
var RootDependencySet = wire.NewSet(
	rootDeps,
	wire.FieldsOf(new(*RootProvider),
		"LoggerFactory",
		"SentryHub",
		"BaseResources",
	),
)
View Source
var TaskDependencySet = wire.NewSet(
	AppRootDeps,
	wire.FieldsOf(new(*TaskProvider),
		"AppProvider",
		"Context",
	),
)
View Source
var TemplateWebAppNotFoundHTML = template.RegisterHTML(
	"web/app_not_found.html",
	web.ComponentsHTML...,
)

Functions

func NewCookieManager

func NewCookieManager(
	r *http.Request,
	trustProxy config.TrustProxy,
	httpCfg *config.HTTPConfig,
) *httputil.CookieManager

func ProvideAdminAPIAuthKeyMaterials

func ProvideAdminAPIAuthKeyMaterials(c *config.SecretConfig) *config.AdminAPIAuthKey

func ProvideAnalyticRedisCredentials

func ProvideAnalyticRedisCredentials(c *config.SecretConfig) *config.AnalyticRedisCredentials

func ProvideAuditDatabaseCredentials

func ProvideAuditDatabaseCredentials(c *config.SecretConfig) *config.AuditDatabaseCredentials

func ProvideCSRFKeyMaterials

func ProvideCSRFKeyMaterials(c *config.SecretConfig) *config.CSRFKeyMaterials

func ProvideCaptureTaskContext

func ProvideCaptureTaskContext(config *config.Config, appCtx *config.AppContext) task.CaptureTaskContext

func ProvideCustomSMSProviderConfig

func ProvideCustomSMSProviderConfig(c *config.SecretConfig) *config.CustomSMSProviderConfig

func ProvideDatabaseCredentials

func ProvideDatabaseCredentials(c *config.SecretConfig) *config.DatabaseCredentials

func ProvideDefaultLanguageTag

func ProvideDefaultLanguageTag(c *config.Config) template.DefaultLanguageTag

func ProvideElasticsearchCredentials

func ProvideElasticsearchCredentials(c *config.SecretConfig) *config.ElasticsearchCredentials

func ProvideHTTPHost

func ProvideHTTPHost(r *http.Request, trustProxy config.TrustProxy) httputil.HTTPHost

func ProvideHTTPProto

func ProvideHTTPProto(r *http.Request, trustProxy config.TrustProxy) httputil.HTTPProto

func ProvideImagesKeyMaterials

func ProvideImagesKeyMaterials(c *config.SecretConfig) *config.ImagesKeyMaterials

func ProvideNexmoCredentials

func ProvideNexmoCredentials(c *config.SecretConfig) *config.NexmoCredentials

func ProvideOAuthClientCredentials

func ProvideOAuthClientCredentials(c *config.SecretConfig) *config.OAuthClientCredentials

func ProvideOAuthKeyMaterials

func ProvideOAuthKeyMaterials(c *config.SecretConfig) *config.OAuthKeyMaterials

func ProvideRedisCredentials

func ProvideRedisCredentials(c *config.SecretConfig) *config.RedisCredentials

func ProvideRedisQueueHTTPHost

func ProvideRedisQueueHTTPHost() httputil.HTTPHost

func ProvideRedisQueueHTTPProto

func ProvideRedisQueueHTTPProto() httputil.HTTPProto

func ProvideRedisQueueHTTPRequest

func ProvideRedisQueueHTTPRequest() *http.Request

func ProvideRedisQueueRemoteIP

func ProvideRedisQueueRemoteIP() httputil.RemoteIP

func ProvideRedisQueueUserAgentString

func ProvideRedisQueueUserAgentString() httputil.UserAgentString

func ProvideRemoteIP

func ProvideRemoteIP(r *http.Request, trustProxy config.TrustProxy) httputil.RemoteIP

func ProvideRequestContext

func ProvideRequestContext(r *http.Request) context.Context

func ProvideRestoreTaskContext

func ProvideRestoreTaskContext(p *RootProvider) task.RestoreTaskContext

func ProvideSMTPServerCredentials

func ProvideSMTPServerCredentials(c *config.SecretConfig) *config.SMTPServerCredentials

func ProvideSupportedLanguageTags

func ProvideSupportedLanguageTags(c *config.Config) template.SupportedLanguageTags

func ProvideTwilioCredentials

func ProvideTwilioCredentials(c *config.SecretConfig) *config.TwilioCredentials

func ProvideUserAgentString

func ProvideUserAgentString(r *http.Request) httputil.UserAgentString

func ProvideWATICredentials

func ProvideWATICredentials(c *config.SecretConfig) *config.WATICredentials

func ProvideWebhookKeyMaterials

func ProvideWebhookKeyMaterials(c *config.SecretConfig) *config.WebhookKeyMaterials

Types

type AppProvider

type AppProvider struct {
	*RootProvider

	Context            context.Context
	LoggerFactory      *log.Factory
	AppDatabase        *appdb.Handle
	AuditReadDatabase  *auditdb.ReadHandle
	AuditWriteDatabase *auditdb.WriteHandle
	Redis              *appredis.Handle
	AnalyticRedis      *analyticredis.Handle
	TaskQueue          task.Queue
	AppContext         *config.AppContext
	GlobalRedis        *globalredis.Handle
}

func (*AppProvider) NewRequestProvider

func (p *AppProvider) NewRequestProvider(w http.ResponseWriter, r *http.Request) *RequestProvider

func (*AppProvider) NewTaskProvider

func (p *AppProvider) NewTaskProvider(ctx context.Context) *TaskProvider

type BackgroundProvider

type BackgroundProvider struct {
	EnvironmentConfig  *config.EnvironmentConfig
	ConfigSourceConfig *configsource.Config
	LoggerFactory      *log.Factory
	SentryHub          *getsentry.Hub
	DatabasePool       *db.Pool
	RedisPool          *redis.Pool
	RedisHub           *redis.Hub
	BaseResources      *resource.Manager
	EmbeddedResources  *web.GlobalEmbeddedResourceManager
}

func NewBackgroundProvider

func NewBackgroundProvider(
	cfg *config.EnvironmentConfig,
	configSourceConfig *configsource.Config,
	builtinResourceDirectory string,
	customResourceDirectory string,
) (*BackgroundProvider, error)

type RequestMiddleware

type RequestMiddleware struct {
	HTTPHost        httputil.HTTPHost
	RootProvider    *RootProvider
	ConfigSource    *configsource.ConfigSource
	TemplateEngine  *template.Engine
	BaseViewModeler *viewmodels.BaseViewModeler
}

func (*RequestMiddleware) Handle

func (m *RequestMiddleware) Handle(next http.Handler) http.Handler

type RequestProvider

type RequestProvider struct {
	*AppProvider

	Request        *http.Request
	ResponseWriter http.ResponseWriter
}

type RootProvider

type RootProvider struct {
	EnvironmentConfig  *config.EnvironmentConfig
	ConfigSourceConfig *configsource.Config
	LoggerFactory      *log.Factory
	SentryHub          *getsentry.Hub
	DatabasePool       *db.Pool
	RedisPool          *redis.Pool
	RedisHub           *redis.Hub
	TaskQueueFactory   TaskQueueFactory
	BaseResources      *resource.Manager
	EmbeddedResources  *web.GlobalEmbeddedResourceManager
}

func NewRootProvider

func NewRootProvider(
	cfg *config.EnvironmentConfig,
	configSourceConfig *configsource.Config,
	builtinResourceDirectory string,
	customResourceDirectory string,
	taskQueueFactory TaskQueueFactory,
) (*RootProvider, error)

func (*RootProvider) Handler

func (p *RootProvider) Handler(factory func(*RequestProvider) http.Handler) http.Handler

func (*RootProvider) Middleware

func (p *RootProvider) Middleware(factory func(*RequestProvider) httproute.Middleware) httproute.Middleware

func (*RootProvider) NewAppProvider

func (p *RootProvider) NewAppProvider(ctx context.Context, appCtx *config.AppContext) *AppProvider

func (*RootProvider) RootHandler

func (*RootProvider) RootMiddleware

func (p *RootProvider) RootMiddleware(factory func(*RootProvider) httproute.Middleware) httproute.Middleware

func (*RootProvider) Task

func (p *RootProvider) Task(factory func(provider *TaskProvider) task.Task) task.Task

type TaskFunc

type TaskFunc func(ctx context.Context, param task.Param) error

func (TaskFunc) Run

func (f TaskFunc) Run(ctx context.Context, param task.Param) error

type TaskProvider

type TaskProvider struct {
	*AppProvider

	Context context.Context
}

type TaskQueueFactory

type TaskQueueFactory func(*AppProvider) task.Queue

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL