Undocumented Interceptor Properties for ModuleConfig.cfc

In the Module documentation page there is an example (found here: http://wiki.coldbox.org/wiki/Modules.cfm#The_Module_Configuration_Object) which declares an interceptor and following two properties:

URLMatch = ‘/api-docs’,
loginURL = ‘/api-docs/login’

For my “admin” module I have tried to implement the same approach:

interceptors = [
{name=“modulesecurity”,class="#moduleMapping#.interceptors.ModuleSecurity",
properties={
URLMatch = ‘/admin’,
loginURL = ‘/admin:main/login’
}
];

I’m assuming that the urlMatch property is similar to the securyList for the securityInterceptor where the user will be redirect to loginURL if the conditions in the interceptor class are not met. The result I desire is that when any handler/action in my “admin” module is hit that the interceptor is fired, evaluated and if the conditions are not met then the user is redirect to the loginURL. This works, with the exception that this interceptor is getting called from the host app and not only from the urls that match what is the in the URLMatch property.

Have I made false assumptions?

Interceptors defined in modules are application wide not module only.

You can use the “eventPattern” annotation on the function’s in the interceptor to narrow it down to your module only.

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Awesome, I wasn’t aware of the new “eventPattern” annotation but I highly favor this over the security.xml.cfm config. Good work my man, you are always several leaps ahead!

Although, the “MatchURL” and “loginURL” would make some great properties to a security interceptor as well.

-Aaron

This sounds really cool - has it now been documented?

Thanks!

the eventPattern is documented in the what’s new but not in the interceptor docs as once I reach gold I will start updating the rest of the wiki.

I also have a ticket to add the eventpattern at the configuration level too.

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com