contentbox.models.security

Class RateLimiter

lucee.Component
    extended by coldbox.system.FrameworkSupertype
      extended by coldbox.system.Interceptor
        extended by contentbox.models.security.RateLimiter

ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- Limits and prevents DOS attacks

Class Attributes:
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
    Property Summary
    type property default serializable required
    any securityService


    • access = public
    • returntype = any
    • inject = id:securityService@contentbox
    true false
    any settingService


    • access = public
    • returntype = any
    • inject = id:settingService@contentbox
    true false
    Method Summary
    any configure()
         Configure.
    private any limiter([any count], [any duration], [any event], [any settings])
         Written by Charlie Arehart, charlie@carehart.
    any onRequestCapture([any event], [any data], [any buffer])
         Limiter.
     
    Methods inherited from class coldbox.system.Interceptor
    cbLoadInterceptorHelpers, getProperties, getProperty, init, propertyExists, setProperties, setProperty, unregister
     
    Methods inherited from class coldbox.system.FrameworkSupertype
    announce, announceInterception, async, back, externalView, forAttribute, getCache, getCachebox, getColdBoxSetting, getController, getDateTimeHelper, getEnv, getFlash, getFlow, getInstance, getIsoTime, getJsonUtil, getLog, getLogBox, getModuleConfig, getModuleSettings, getRenderer, getRequestCollection, getRequestContext, getRootWireBox, getSetting, getSystemProperty, getSystemSetting, getUserSessionIdentifier, getWirebox, ifNull, ifPresent, inDebugMode, includeUDF, isDevelopment, isProduction, isTesting, layout, listen, loadApplicationHelpers, locateDirectoryPath, locateFilePath, persistVariables, populate, populateModel, relocate, renderExternalView, renderLayout, renderview, runEvent, runRoute, setCachebox, setController, setEnv, setFlash, setFlow, setJsonUtil, setLog, setLogBox, setSetting, setWirebox, settingExists, throwIf, throwUnless, toJson, unless, view, when
     
    Methods inherited from class lucee.Component
    None

    Property Detail

    securityService

    property any securityService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - id:securityService@contentbox
    serializable - true

    settingService

    property any settingService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - id:settingService@contentbox
    serializable - true

    Method Detail

    configure

    public any configure()

    Configure

    Overrides:
    configure in class coldbox.system.Interceptor

    limiter

    private any limiter([any count], [any duration], [any event], [any settings])

    Written by Charlie Arehart, charlie@carehart.org, in 2009, updated 2012, modified by Luis Majano 2016 - Throttles requests made more than "count" times within "duration" seconds from single IP. - Duck typed for performance

    Parameters:
    count - The throttle counter
    duration - The time in seconds to limit
    event - The request context object
    settings - The settings structure

    onRequestCapture

    public any onRequestCapture([any event], [any data], [any buffer])

    Limiter

    Parameters:
    event
    data
    buffer