LoginRateLimiter

StockSharp.Server.Core

Rate limiter for login attempts. Tracks failed attempts per IP address and rejects connections that exceed the configured threshold within a sliding time window.

コンストラクター

LoginRateLimiter(int, TimeSpan?)

Initializes a new instance.

maxAttempts
Maximum failed attempts allowed within the window.
window
Sliding time window for tracking attempts.

プロパティ

TrackedCount : int

Number of IP trackers currently held. Exposed for diagnostics and tests to verify that empty trackers are evicted and do not accumulate.

メソッド

IsLimited(EndPoint) : bool

Check if the given endpoint is rate-limited.

remoteEndPoint
Client endpoint.

戻り値: true if the client should be rejected.

RecordFailure(EndPoint)

Record a failed login attempt for the given endpoint.

remoteEndPoint
Client endpoint.
RecordSuccess(EndPoint)

Record a successful login — clears the failure counter for the endpoint.

remoteEndPoint
Client endpoint.