driver

package
v0.9.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 52 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SkipNetworkInit

func SkipNetworkInit(o *options)

Types

type Registry

type Registry interface {
	dbal.Driver

	Init(ctx context.Context, opts ...RegistryOption) error

	WithLogger(l *logrusx.Logger) Registry

	WithCSRFHandler(c nosurf.Handler)
	WithCSRFTokenGenerator(cg x.CSRFToken)

	MetricsHandler() *prometheus.Handler
	HealthHandler(ctx context.Context) *healthx.Handler
	CookieManager(ctx context.Context) sessions.StoreExact
	ContinuityCookieManager(ctx context.Context) sessions.StoreExact

	RegisterRoutes(ctx context.Context, public *x.RouterPublic, admin *x.RouterAdmin)
	RegisterPublicRoutes(ctx context.Context, public *x.RouterPublic)
	RegisterAdminRoutes(ctx context.Context, admin *x.RouterAdmin)
	PrometheusManager() *prometheus.MetricsManager
	Tracer(context.Context) *tracing.Tracer

	config.Provider
	CourierConfig(ctx context.Context) config.CourierConfigs
	WithConfig(c *config.Config) Registry

	x.CSRFProvider
	x.WriterProvider
	x.LoggingProvider
	x.HTTPClientProvider

	continuity.ManagementProvider
	continuity.PersistenceProvider

	courier.Provider

	persistence.Provider

	errorx.ManagementProvider
	errorx.HandlerProvider
	errorx.PersistenceProvider

	hash.HashProvider

	identity.HandlerProvider
	identity.ValidationProvider
	identity.PoolProvider
	identity.PrivilegedPoolProvider
	identity.ManagementProvider
	identity.ActiveCredentialsCounterStrategyProvider

	schema.HandlerProvider

	password2.ValidationProvider

	session.HandlerProvider
	session.ManagementProvider
	session.PersistenceProvider

	settings.HandlerProvider
	settings.ErrorHandlerProvider
	settings.FlowPersistenceProvider
	settings.StrategyProvider

	login.FlowPersistenceProvider
	login.ErrorHandlerProvider
	login.HooksProvider
	login.HookExecutorProvider
	login.HandlerProvider
	login.StrategyProvider

	logout.HandlerProvider

	registration.FlowPersistenceProvider
	registration.ErrorHandlerProvider
	registration.HooksProvider
	registration.HookExecutorProvider
	registration.HandlerProvider
	registration.StrategyProvider

	verification.FlowPersistenceProvider
	verification.ErrorHandlerProvider
	verification.HandlerProvider
	verification.StrategyProvider

	link.SenderProvider
	link.VerificationTokenPersistenceProvider
	link.RecoveryTokenPersistenceProvider

	recovery.FlowPersistenceProvider
	recovery.ErrorHandlerProvider
	recovery.HandlerProvider
	recovery.StrategyProvider

	x.CSRFTokenGeneratorProvider
}

func New

func New(ctx context.Context, stdOutOrErr io.Writer, opts ...configx.OptionModifier) Registry

func NewRegistryFromDSN

func NewRegistryFromDSN(c *config.Config, l *logrusx.Logger) (Registry, error)

func NewWithoutInit

func NewWithoutInit(ctx context.Context, stdOutOrErr io.Writer, opts ...configx.OptionModifier) Registry

type RegistryDefault

type RegistryDefault struct {
	// contains filtered or unexported fields
}

func NewRegistryDefault

func NewRegistryDefault() *RegistryDefault

func (*RegistryDefault) ActiveCredentialsCounterStrategies

func (m *RegistryDefault) ActiveCredentialsCounterStrategies(ctx context.Context) (activeCredentialsCounterStrategies []identity.ActiveCredentialsCounter)

func (*RegistryDefault) AllLoginStrategies

func (m *RegistryDefault) AllLoginStrategies() login.Strategies

func (*RegistryDefault) AllRecoveryStrategies

func (m *RegistryDefault) AllRecoveryStrategies() (recoveryStrategies recovery.Strategies)

func (*RegistryDefault) AllRegistrationStrategies

func (m *RegistryDefault) AllRegistrationStrategies() registration.Strategies

func (*RegistryDefault) AllSettingsStrategies

func (m *RegistryDefault) AllSettingsStrategies() settings.Strategies

func (*RegistryDefault) AllVerificationStrategies

func (m *RegistryDefault) AllVerificationStrategies() (recoveryStrategies verification.Strategies)

func (*RegistryDefault) Audit

func (m *RegistryDefault) Audit() *logrusx.Logger

func (*RegistryDefault) CSRFHandler

func (m *RegistryDefault) CSRFHandler() nosurf.Handler

func (*RegistryDefault) CanHandle

func (m *RegistryDefault) CanHandle(dsn string) bool

func (*RegistryDefault) Cipher

func (m *RegistryDefault) Cipher() cipher.Cipher

func (*RegistryDefault) Config

func (m *RegistryDefault) Config(ctx context.Context) *config.Config

func (*RegistryDefault) ContinuityCookieManager

func (m *RegistryDefault) ContinuityCookieManager(ctx context.Context) sessions.StoreExact

func (*RegistryDefault) ContinuityManager

func (m *RegistryDefault) ContinuityManager() continuity.Manager

func (*RegistryDefault) ContinuityPersister

func (m *RegistryDefault) ContinuityPersister() continuity.Persister

func (*RegistryDefault) CookieManager

func (m *RegistryDefault) CookieManager(ctx context.Context) sessions.StoreExact

func (*RegistryDefault) Courier

func (m *RegistryDefault) Courier(ctx context.Context) courier.Courier

func (*RegistryDefault) CourierConfig

func (m *RegistryDefault) CourierConfig(ctx context.Context) config.CourierConfigs

func (*RegistryDefault) CourierPersister

func (m *RegistryDefault) CourierPersister() courier.Persister

func (*RegistryDefault) GenerateCSRFToken

func (m *RegistryDefault) GenerateCSRFToken(r *http.Request) string

func (*RegistryDefault) HTTPClient

func (m *RegistryDefault) HTTPClient(ctx context.Context, opts ...httpx.ResilientOptions) *retryablehttp.Client

func (*RegistryDefault) Hasher

func (m *RegistryDefault) Hasher() hash.Hasher

func (*RegistryDefault) HealthHandler

func (m *RegistryDefault) HealthHandler(_ context.Context) *healthx.Handler

func (*RegistryDefault) HookAddressVerifier

func (m *RegistryDefault) HookAddressVerifier() *hook.AddressVerifier

func (*RegistryDefault) HookSessionDestroyer

func (m *RegistryDefault) HookSessionDestroyer() *hook.SessionDestroyer

func (*RegistryDefault) HookSessionIssuer

func (m *RegistryDefault) HookSessionIssuer() *hook.SessionIssuer

func (*RegistryDefault) HookVerifier

func (m *RegistryDefault) HookVerifier() *hook.Verifier

func (*RegistryDefault) IdentityHandler

func (m *RegistryDefault) IdentityHandler() *identity.Handler

func (*RegistryDefault) IdentityManager

func (m *RegistryDefault) IdentityManager() *identity.Manager

func (*RegistryDefault) IdentityPool

func (m *RegistryDefault) IdentityPool() identity.Pool

func (*RegistryDefault) IdentityTraitsSchemas

func (m *RegistryDefault) IdentityTraitsSchemas(ctx context.Context) (schema.Schemas, error)

func (*RegistryDefault) IdentityValidator

func (m *RegistryDefault) IdentityValidator() *identity.Validator

func (*RegistryDefault) Init

func (m *RegistryDefault) Init(ctx context.Context, opts ...RegistryOption) error

func (*RegistryDefault) LinkSender

func (m *RegistryDefault) LinkSender() *link.Sender

func (*RegistryDefault) Logger

func (m *RegistryDefault) Logger() *logrusx.Logger

func (*RegistryDefault) LoginFlowErrorHandler

func (m *RegistryDefault) LoginFlowErrorHandler() *login.ErrorHandler

func (*RegistryDefault) LoginFlowPersister

func (m *RegistryDefault) LoginFlowPersister() login.FlowPersister

func (*RegistryDefault) LoginHandler

func (m *RegistryDefault) LoginHandler() *login.Handler

func (*RegistryDefault) LoginHookExecutor

func (m *RegistryDefault) LoginHookExecutor() *login.HookExecutor

func (*RegistryDefault) LoginStrategies

func (m *RegistryDefault) LoginStrategies(ctx context.Context) (loginStrategies login.Strategies)

func (*RegistryDefault) LogoutHandler

func (m *RegistryDefault) LogoutHandler() *logout.Handler

func (*RegistryDefault) MetricsHandler

func (m *RegistryDefault) MetricsHandler() *prometheus.Handler

func (*RegistryDefault) PasswordValidator

func (m *RegistryDefault) PasswordValidator() password2.Validator

func (*RegistryDefault) Persister

func (m *RegistryDefault) Persister() persistence.Persister

func (*RegistryDefault) Ping

func (m *RegistryDefault) Ping() error

func (*RegistryDefault) PostLoginHooks

func (m *RegistryDefault) PostLoginHooks(ctx context.Context, credentialsType identity.CredentialsType) (b []login.PostHookExecutor)

func (*RegistryDefault) PostRecoveryHooks

func (m *RegistryDefault) PostRecoveryHooks(ctx context.Context) (b []recovery.PostHookExecutor)

func (*RegistryDefault) PostRegistrationPostPersistHooks

func (m *RegistryDefault) PostRegistrationPostPersistHooks(ctx context.Context, credentialsType identity.CredentialsType) (b []registration.PostHookPostPersistExecutor)

func (*RegistryDefault) PostRegistrationPrePersistHooks

func (m *RegistryDefault) PostRegistrationPrePersistHooks(ctx context.Context, credentialsType identity.CredentialsType) (b []registration.PostHookPrePersistExecutor)

func (*RegistryDefault) PostSettingsPostPersistHooks

func (m *RegistryDefault) PostSettingsPostPersistHooks(ctx context.Context, settingsType string) (b []settings.PostHookPostPersistExecutor)

func (*RegistryDefault) PostSettingsPrePersistHooks

func (m *RegistryDefault) PostSettingsPrePersistHooks(ctx context.Context, settingsType string) (b []settings.PostHookPrePersistExecutor)

func (*RegistryDefault) PostVerificationHooks

func (m *RegistryDefault) PostVerificationHooks(ctx context.Context) (b []verification.PostHookExecutor)

func (*RegistryDefault) PreLoginHooks

func (m *RegistryDefault) PreLoginHooks(ctx context.Context) (b []login.PreHookExecutor)

func (*RegistryDefault) PreRegistrationHooks

func (m *RegistryDefault) PreRegistrationHooks(ctx context.Context) (b []registration.PreHookExecutor)

func (*RegistryDefault) PrivilegedIdentityPool

func (m *RegistryDefault) PrivilegedIdentityPool() identity.PrivilegedPool

func (*RegistryDefault) PrometheusManager

func (m *RegistryDefault) PrometheusManager() *prometheus.MetricsManager

func (*RegistryDefault) RecoveryExecutor

func (m *RegistryDefault) RecoveryExecutor() *recovery.HookExecutor

func (*RegistryDefault) RecoveryFlowErrorHandler

func (m *RegistryDefault) RecoveryFlowErrorHandler() *recovery.ErrorHandler

func (*RegistryDefault) RecoveryFlowPersister

func (m *RegistryDefault) RecoveryFlowPersister() recovery.FlowPersister

func (*RegistryDefault) RecoveryHandler

func (m *RegistryDefault) RecoveryHandler() *recovery.Handler

func (*RegistryDefault) RecoveryStrategies

func (m *RegistryDefault) RecoveryStrategies(ctx context.Context) (recoveryStrategies recovery.Strategies)

func (*RegistryDefault) RecoveryTokenPersister

func (m *RegistryDefault) RecoveryTokenPersister() link.RecoveryTokenPersister

func (*RegistryDefault) RegisterAdminRoutes

func (m *RegistryDefault) RegisterAdminRoutes(ctx context.Context, router *x.RouterAdmin)

func (*RegistryDefault) RegisterPublicRoutes

func (m *RegistryDefault) RegisterPublicRoutes(ctx context.Context, router *x.RouterPublic)

func (*RegistryDefault) RegisterRoutes

func (m *RegistryDefault) RegisterRoutes(ctx context.Context, public *x.RouterPublic, admin *x.RouterAdmin)

func (*RegistryDefault) RegistrationErrorHandler

func (m *RegistryDefault) RegistrationErrorHandler() *registration.ErrorHandler

func (*RegistryDefault) RegistrationExecutor

func (m *RegistryDefault) RegistrationExecutor() *registration.HookExecutor

func (*RegistryDefault) RegistrationFlowErrorHandler

func (m *RegistryDefault) RegistrationFlowErrorHandler() *registration.ErrorHandler

func (*RegistryDefault) RegistrationFlowPersister

func (m *RegistryDefault) RegistrationFlowPersister() registration.FlowPersister

func (*RegistryDefault) RegistrationHandler

func (m *RegistryDefault) RegistrationHandler() *registration.Handler

func (*RegistryDefault) RegistrationHookExecutor

func (m *RegistryDefault) RegistrationHookExecutor() *registration.HookExecutor

func (*RegistryDefault) RegistrationStrategies

func (m *RegistryDefault) RegistrationStrategies(ctx context.Context) (registrationStrategies registration.Strategies)

func (*RegistryDefault) SchemaHandler

func (m *RegistryDefault) SchemaHandler() *schema.Handler

func (*RegistryDefault) SelfServiceErrorHandler

func (m *RegistryDefault) SelfServiceErrorHandler() *errorx.Handler

func (*RegistryDefault) SelfServiceErrorManager

func (m *RegistryDefault) SelfServiceErrorManager() *errorx.Manager

func (*RegistryDefault) SelfServiceErrorPersister

func (m *RegistryDefault) SelfServiceErrorPersister() errorx.Persister

func (*RegistryDefault) SessionHandler

func (m *RegistryDefault) SessionHandler() *session.Handler

func (*RegistryDefault) SessionManager

func (m *RegistryDefault) SessionManager() session.Manager

func (*RegistryDefault) SessionPersister

func (m *RegistryDefault) SessionPersister() session.Persister

func (*RegistryDefault) SetPersister

func (m *RegistryDefault) SetPersister(p persistence.Persister)

func (*RegistryDefault) SettingsFlowErrorHandler

func (m *RegistryDefault) SettingsFlowErrorHandler() *settings.ErrorHandler

func (*RegistryDefault) SettingsFlowPersister

func (m *RegistryDefault) SettingsFlowPersister() settings.FlowPersister

func (*RegistryDefault) SettingsHandler

func (m *RegistryDefault) SettingsHandler() *settings.Handler

func (*RegistryDefault) SettingsHookExecutor

func (m *RegistryDefault) SettingsHookExecutor() *settings.HookExecutor

func (*RegistryDefault) SettingsStrategies

func (m *RegistryDefault) SettingsStrategies(ctx context.Context) (profileStrategies settings.Strategies)

func (*RegistryDefault) Tracer

func (m *RegistryDefault) Tracer(ctx context.Context) *tracing.Tracer

func (*RegistryDefault) VerificationExecutor

func (m *RegistryDefault) VerificationExecutor() *verification.HookExecutor

func (*RegistryDefault) VerificationFlowErrorHandler

func (m *RegistryDefault) VerificationFlowErrorHandler() *verification.ErrorHandler

func (*RegistryDefault) VerificationFlowPersister

func (m *RegistryDefault) VerificationFlowPersister() verification.FlowPersister

func (*RegistryDefault) VerificationHandler

func (m *RegistryDefault) VerificationHandler() *verification.Handler

func (*RegistryDefault) VerificationManager

func (m *RegistryDefault) VerificationManager() *identity.Manager

func (*RegistryDefault) VerificationStrategies

func (m *RegistryDefault) VerificationStrategies(ctx context.Context) (verificationStrategies verification.Strategies)

func (*RegistryDefault) VerificationTokenPersister

func (m *RegistryDefault) VerificationTokenPersister() link.VerificationTokenPersister

func (*RegistryDefault) WithCSRFHandler

func (m *RegistryDefault) WithCSRFHandler(c nosurf.Handler)

func (*RegistryDefault) WithCSRFTokenGenerator

func (m *RegistryDefault) WithCSRFTokenGenerator(cg x.CSRFToken)

func (*RegistryDefault) WithConfig

func (m *RegistryDefault) WithConfig(c *config.Config) Registry

func (*RegistryDefault) WithHooks

func (m *RegistryDefault) WithHooks(hooks map[string]func(config.SelfServiceHook) interface{})

func (*RegistryDefault) WithLogger

func (m *RegistryDefault) WithLogger(l *logrusx.Logger) Registry

func (*RegistryDefault) Writer

func (m *RegistryDefault) Writer() herodot.Writer

type RegistryOption

type RegistryOption func(*options)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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