Hello,
I’m trying to use AOP to audit logins. However as soon as I map the aspect in wirebox the login fails.
Comment out the mapAspect call and the login goes through no problem.
I’m not sure where to start debugging this.
the line in wirebox is:
mapAspect(“SecurityAuditAspect”).to(“aspects.SecurityAuditAspect”);
and the invokeMethod function in aspects.SecurityAuditAspect looks like this:
var refLocal = {};
var loginStruct = {};
loginStruct.target = arguments.invocation.getTargetName();
loginStruct.method = arguments.invocation.getMethod();
loginStruct.arguments = arguments.invocation.getArgs();
if(isdefined(“loginStruct.arguments.rc.password”))
{
loginStruct.arguments.rc.password = “”;
}
// log incoming call
log.info(serializeJSON(loginStruct));
// proceed execution
refLocal.results = arguments.invocation.proceed();
I’m using the coldbox.system.interceptors.Security interceptor, with the DB providing the rules. All that works fine, until I map the SecurityAuditAspect
any thoughts?
Cheers
Steve