faxi05
12/19/2022, 3:34 PMfunction preHandler( event, action, eventArguments ){
var authDetails = event.getHTTPBasicCredentials();
if( !securityService.authenticate( authDetails.username, authDetails.password ) ) {
event.renderData( type="JSON", data={ message = 'Please check your credentials' }, statusCode=401, statusMessage="You're not authorized to do that");
}
}
Today I discovered that in CB 6.6, the renderData() call seems never to run, but the unauthenticated user is allowed to proceed... using event.noRender() instead works, but I would like to know if this is a bug or a feature? :)