contentbox.model.security

Class RateLimiter

railo-context.Component
        extended by coldbox.system.FrameworkSupertype
            extended by coldbox.system.Interceptor
                extended by contentbox.model.security.RateLimiter
Class Attributes:
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  

    ContentBox - A Modular Content Platform Copyright 2012 by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com Apache License, Version 2.0 Copyright Since [2012] [Luis Majano and Ortus Solutions,Corp] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Limits and prevents DOS attacks

    Property Summary
    type property default serializable required
    any loginTrackerService


    • inject = id:loginTrackerService@cb
    true false
    any settingService


    • inject = id:settingService@cb
    true false
    Method Summary
    any configure()
         Configure.
    private any limiter([any count='4'], [any duration='1'], any event)
         Written by Charlie Arehart, charlie@carehart.
    any onRequestCapture([any event], [any interceptData], [any buffer])
         Limiter.
     
    Methods inherited from class coldbox.system.Interceptor
    appendToBuffer, clearBuffer, getBufferObject, getBufferString, getInterceptorService, getProperties, getProperty, init, propertyExists, setProperties, setProperty, unregister
     
    Methods inherited from class coldbox.system.FrameworkSupertype
    addAsset, announceInterception, getCache, getController, getDatasource, getInstance, getInterceptor, getModel, getModuleConfig, getModuleSettings, getMyPlugin, getPlugin, getRenderer, getRequestCollection, getRequestContext, getSetting, getSettingStructure, includeUDF, loadApplicationHelpers, locateDirectoryPath, locateFilePath, persistVariables, populateModel, renderExternalView, renderLayout, renderView, runEvent, setController, setNextEvent, setSetting, settingExists
     
    Methods inherited from class railo-context.Component
    None

    Property Detail

    loginTrackerService

    property any loginTrackerService

    Attributes:
    required - false
    inject - id:loginTrackerService@cb
    serializable - true

    settingService

    property any settingService

    Attributes:
    required - false
    inject - id:settingService@cb
    serializable - true

    Method Detail

    configure

    public any configure()

    Configure

    Overrides:
    configure in class coldbox.system.Interceptor

    limiter

    private any limiter([any count='4'], [any duration='1'], any event)

    Written by Charlie Arehart, charlie@carehart.org, in 2009, updated 2012 - Throttles requests made more than "count" times within "duration" seconds from single IP.

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

    onRequestCapture

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

    Limiter

    Parameters:
    event
    interceptData
    buffer