contentbox.models.security

Class LoginTrackerService

lucee.Component
    extended by cborm.models.BaseORMService
      extended by cborm.models.VirtualEntityService
        extended by contentbox.models.security.LoginTrackerService

ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- This Service tracks logins into the ContentBox System

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


    • access = public
    • returntype = any
    • inject = cbhelper@contentbox
    true false
    any log


    • access = public
    • returntype = any
    • inject = logbox:logger:{this}
    true false
    any settingService


    • access = public
    • returntype = any
    • inject = id:settingService@contentbox
    true false
    Constructor Summary
    init()
          Constructor.
    Method Summary
    array getAll([any sortOrder='attempts'])
         Retrieve all auth logs.
    any getLastLogins(numeric max)
         Get the last successful logins.
    boolean isBlocked([LoginAttempt attempt])
         Verify if an attempt is being blocked or not.
    LoginTrackerService reset()
         Reset login attempts if the time limit is reached.
    LoginTrackerService rotate()
         Rotate auth logs.
    LoginTrackerService truncate()
         Truncate the entire auth logs.
     
    Methods inherited from class cborm.models.VirtualEntityService
    autoCast, convertIdValueToJavaType, convertValueToJavaType, count, countWhere, deleteAll, deleteByID, deleteByQuery, deleteWhere, evictCollection, executeQuery, exists, findAllWhere, findWhere, get, getEntityName, getKey, getOrFail, getPropertyNames, getTableName, idCast, list, new, newCriteria, onMissingMethod, setEntityName
     
    Methods inherited from class cborm.models.BaseORMService
    $transactioned, buildJavaProxy, clear, createService, delete, evict, evictQueries, findAll, findByExample, findIt, findOrFail, getBeanPopulator, getDatasource, getDefaultAsQuery, getDirtyPropertyNames, getDynamicProcessor, getEntityGivenName, getEntityMetadata, getEventHandling, getKeyValue, getLogger, getORMEventHandler, getObjectPopulator, getOrm, getPropertyValues, getQueryCacheRegion, getRestrictions, getSessionStatistics, getStringBuilder, getUseQueryCaching, getUseTransactions, getWirebox, isDirty, isSessionDirty, merge, nullValue, populate, populateFromJson, populateFromQuery, populateFromXml, populateWithPrefix, refresh, save, saveAll, sessionContains, setDatasource, setDefaultAsQuery, setEventHandling, setLogger, setORM, setORMEventHandler, setQueryCacheRegion, setUseQueryCaching, setUseTransactions, setWirebox, when
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init()

    Constructor


    Property Detail

    cb

    property any cb

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

    log

    property any log

    Attributes:
    access - public
    required - false
    returntype - any
    inject - logbox:logger:{this}
    serializable - true

    settingService

    property any settingService

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

    Method Detail

    getAll

    public array getAll([any sortOrder='attempts'])

    Retrieve all auth logs

    Overrides:
    getAll in class cborm.models.VirtualEntityService
    Parameters:
    sortOrder - The sorting columns.

    getLastLogins

    public any getLastLogins(numeric max)

    Get the last successful logins

    Parameters:
    max - How many to retrieve

    isBlocked

    public boolean isBlocked([LoginAttempt attempt])

    Verify if an attempt is being blocked or not

    Parameters:
    attempt - The login attempt object
    Returns:
    If the attempt was blocked or not

    reset

    public LoginTrackerService reset()

    Reset login attempts if the time limit is reached


    rotate

    public LoginTrackerService rotate()

    Rotate auth logs Usually called by the {@code LoginTracker} Interceptor asynchronously


    truncate

    public LoginTrackerService truncate()

    Truncate the entire auth logs