contentbox.model.security

Class LoginTrackerService

railo-context.Component
        extended by coldbox.system.orm.hibernate.BaseORMService
            extended by coldbox.system.orm.hibernate.VirtualEntityService
                extended by contentbox.model.security.LoginTrackerService
Class Attributes:
  • singleton
  •  
  • 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. This Service tracks logins into the ContentBox System

    Property Summary
    type property default serializable required
    any cb


    • inject = cbhelper@cb
    true false
    any log


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


    • inject = id:settingService@cb
    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.
    any getRealIP()
         Get Real IP, by looking at clustered, proxy headers and locally.
    boolean isblocked([LoginAttempt attempt])
         Verify if an attempt is being blocked or not.
    LoginTrackerService reset()
    LoginTrackerService rotate()
    LoginTrackerService truncate()
         Truncate the entire auth logs.
     
    Methods inherited from class coldbox.system.orm.hibernate.VirtualEntityService
    clear, convertIDValueToJavaType, convertValueToJavaType, count, countWhere, criteriaCount, criteriaQuery, deleteAll, deleteByID, deleteByQuery, deleteWhere, evict, executeQuery, exists, findAllWhere, findWhere, get, getDatasource, getEntityName, getKey, getPropertyNames, getSessionStatistics, getTableName, isSessionDirty, list, new, newCriteria, onMissingMethod, setDatasource, setEntityName
     
    Methods inherited from class coldbox.system.orm.hibernate.BaseORMService
    $delete, $deleteAll, $deleteByID, $deleteByQuery, $deleteWhere, $save, $saveAll, $transactioned, compileHQLFromDynamicMethod, createCriteriaQuery, createService, delete, evictEntity, evictQueries, findAll, findByExample, findDynamically, findIt, getDefaultAsQuery, getEntityGivenName, getEventHandling, getHQLDynamicCache, getORM, getORMEventHandler, getQueryCacheRegion, getRestrictions, getUseQueryCaching, getUseTransactions, merge, populate, populateFromJSON, populateFromQuery, populateFromXML, populateWithPrefix, refresh, save, saveAll, sessionContains, setDefaultAsQuery, setEventHandling, setHQLDynamicCache, setORM, setORMEventHandler, setQueryCacheRegion, setUseQueryCaching, setUseTransactions
     
    Methods inherited from class railo-context.Component
    None

    Constructor Detail

    init

    public init()

    Constructor


    Property Detail

    cb

    property any cb

    Attributes:
    required - false
    inject - cbhelper@cb
    serializable - true

    log

    property any log

    Attributes:
    required - false
    inject - logbox:logger:{this}
    serializable - true

    settingService

    property any settingService

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

    Method Detail

    getAll

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

    Retrieve all auth logs

    Overrides:
    getAll in class coldbox.system.orm.hibernate.VirtualEntityService
    Parameters:
    sortOrder - The sorting columns.

    getLastLogins

    public any getLastLogins(numeric max)

    Get the last successful logins

    Parameters:
    max - How many to retrieve

    getRealIP

    public any getRealIP()

    Get Real IP, by looking at clustered, proxy headers and locally.


    isblocked

    public boolean isblocked([LoginAttempt attempt])

    Verify if an attempt is being blocked or not

    Parameters:
    attempt - The login attempt object

    reset

    public LoginTrackerService reset()


    rotate

    public LoginTrackerService rotate()


    truncate

    public LoginTrackerService truncate()

    Truncate the entire auth logs