Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultActionDispatcher ¶
type DefaultActionDispatcher struct{}
func (DefaultActionDispatcher) Dispatch ¶
func (DefaultActionDispatcher) Dispatch(view *core.StateView, featureName string, luaAction definitions.LuaAction)
Dispatch sends an action to the Lua execution pipeline, initializing context and preparing authentication details. It blocks until the action is completed and ensures proper resource cleanup.
type DefaultBruteForceService ¶
type DefaultBruteForceService struct{}
DefaultBruteForceService implements core.BruteForceService in the auth subpackage. It mirrors the legacy behavior previously implemented in core.
func (DefaultBruteForceService) LoadHistories ¶
func (DefaultBruteForceService) LoadHistories(ctx *gin.Context, auth *core.AuthState, accountName string)
LoadHistories mirrors the legacy logic that created a BucketManager and populated the AuthState's LoginAttempts/Passwords* counters.
func (DefaultBruteForceService) WaitDelay ¶
func (DefaultBruteForceService) WaitDelay(maxWaitDelay, loginAttempt uint) int
WaitDelay implements the same hyperbolic tangent curve used previously in calculateWaitDelay.
type DefaultCacheService ¶
type DefaultCacheService struct{}
DefaultCacheService implements core.CacheService in the auth subpackage. It mirrors the legacy behavior: on success, write a PositivePasswordCache to Redis. On failure, there is no Redis write here (brute-force bookkeeping is handled elsewhere).
func (DefaultCacheService) OnFailure ¶
func (DefaultCacheService) OnFailure(_ *core.AuthState, _ string)
OnFailure handles the actions required in case of an unsuccessful authentication attempt for the given account name. No negative cache is written here (historic behavior); brute-force metrics are handled by other parts of the pipeline.
type DefaultFeatureEngine ¶
type DefaultFeatureEngine struct{}
DefaultFeatureEngine implements the Lua feature evaluation analogous to the previous AuthState.FeatureLua (excluding the localhost/whitelist shortcuts; those remain in the orchestrator in core/features.go).
type DefaultLuaFilter ¶
type DefaultLuaFilter struct{}
DefaultLuaFilter mirrors the previous AuthState.FilterLua behavior. Implemented in subpackage to avoid import cycles; registered via core.RegisterLuaFilter.
func (DefaultLuaFilter) Filter ¶
func (DefaultLuaFilter) Filter(ctx *gin.Context, view *core.StateView, passDBResult *core.PassDBResult) definitions.AuthResult
Filter implements the Lua filter logic with identical behavior to the legacy inline method.
type DefaultPasswordVerifier ¶
type DefaultPasswordVerifier struct{}
DefaultPasswordVerifier implements core.PasswordVerifier by mirroring the legacy verification loop using core helpers. It iterates configured backends and returns the first decisive result or an aggregated configuration error.
type DefaultPostAction ¶
type DefaultPostAction struct{}
DefaultPostAction mirrors the previous AuthState.PostLuaAction behavior.
func (DefaultPostAction) Run ¶
func (DefaultPostAction) Run(input core.PostActionInput)
Run implements the Lua post action dispatch with identical behavior to the legacy inline method.
type DefaultRBLService ¶
type DefaultRBLService struct{}
DefaultRBLService implements the parallel RBL checks analogous to the previous logic in features.go.
func (DefaultRBLService) Threshold ¶
func (DefaultRBLService) Threshold() int