ColdBox Platform v3.8.0

coldbox.system.interceptors
Class Security

WEB-INF.cftags.component
        extended by coldbox.system.FrameworkSupertype
            extended by coldbox.system.Interceptor
                extended by coldbox.system.interceptors.Security

public class Security
extends Interceptor

This is a security interceptor

Method Summary
private boolean _isUserInValidState(struct rule)
          Verifies that the user is in any role
 void afterAspectsLoad(any event, any interceptData)
 void configure()
          This is the configuration method
 any getValidator()
          Get the current user validator, if any
private boolean isInPattern(any currentEvent, any patternList)
          Verifies that the current event is in a given pattern list
private boolean isValidatorUsed()
          Check to see if using the validator
private void loadDBRules()
          Load rules from the database
private void loadIOCRules()
          Load rules from an IOC bean
private void loadJSONRules()
          Load rules from JSON file
private void loadModelRules()
          Load rules from a model object
private void loadOCMRules()
          Load rules from the OCM
 any loadRules()
          Method to detect the rule source and reload the security rules in the interceptor
private void loadXMLRules()
          Load rules from XML file
 void preEvent(RequestContext event, struct interceptData)
 void preProcess(RequestContext event, struct interceptData)
 void processRules(any event, any interceptData, any currentEvent)
          Process security rules
private array queryToArray(query qRules)
          Convert a rules query to our array format
 void registerValidator(any validatorObject)
          Register a validator object with this interceptor
private void rulesSourceChecks()
          Validate the rules source property
private void validateRulesQuery(query qRules)
          Validate a query as a rules query, else throw error
 
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
$abort, $dump, $htmlhead, $include, $rethrow, $throw, addAsset, announceInterception, getColdboxOCM, getController, getDatasource, getDebugMode, getInterceptor, getMailService, getMailSettings, getMemento, getModel, getModuleSettings, getMyPlugin, getNewMail, getPlugin, getResource, getSetting, getSettingStructure, getSettingsBean, getValidationManager, getfwLocale, includeUDF, loadGlobalUDFLibraries, locateDirectoryPath, locateFilePath, persistVariables, populateModel, relocate, renderExternalView, renderLayout, renderView, runEvent, setDebugMode, setNextEvent, setNextRoute, setSetting, setfwLocale, settingExists, validateModel
 
Methods inherited from class WEB-INF.cftags.component
None
 

Method Detail

_isUserInValidState

private boolean _isUserInValidState(struct rule)
Verifies that the user is in any role

Parameters:
rule - The rule we are validating.

afterAspectsLoad

public void afterAspectsLoad(any event, any interceptData)

Parameters:
event - The event object.
interceptData - interceptData of intercepted info.

configure

public void configure()
This is the configuration method


getValidator

public any getValidator()
Get the current user validator, if any.


isInPattern

private boolean isInPattern(any currentEvent, any patternList)
Verifies that the current event is in a given pattern list

Parameters:
currentEvent - The current event.
patternList - The list pattern to test.

isValidatorUsed

private boolean isValidatorUsed()
Check to see if using the validator


loadDBRules

private void loadDBRules()
Load rules from the database


loadIOCRules

private void loadIOCRules()
Load rules from an IOC bean


loadJSONRules

private void loadJSONRules()
Load rules from JSON file


loadModelRules

private void loadModelRules()
Load rules from a model object


loadOCMRules

private void loadOCMRules()
Load rules from the OCM


loadRules

public any loadRules()
Method to detect the rule source and reload the security rules in the interceptor


loadXMLRules

private void loadXMLRules()
Load rules from XML file


preEvent

public void preEvent(RequestContext event, struct interceptData)

Parameters:
event - The event object.
interceptData - interceptData of intercepted info.

preProcess

public void preProcess(RequestContext event, struct interceptData)

Parameters:
event - The event object.
interceptData - interceptData of intercepted info.

processRules

public void processRules(any event, any interceptData, any currentEvent)
Process security rules. This method is called from an interception point

Parameters:
event - The event object.
interceptData - interceptData of intercepted info.
currentEvent - The possible event syntax to check

queryToArray

private array queryToArray(query qRules)
Convert a rules query to our array format

Parameters:
qRules - The query to convert

registerValidator

public void registerValidator(any validatorObject)
Register a validator object with this interceptor

Parameters:
validatorObject - The validator object to register

rulesSourceChecks

private void rulesSourceChecks()
Validate the rules source property


validateRulesQuery

private void validateRulesQuery(query qRules)
Validate a query as a rules query, else throw error.

Parameters:
qRules - The query to check

ColdBox Platform v3.8.0