I have situation where I am trying to force a user to login. For some reason the setnextevent in my onRequestStart isn’t executing.

in my config:
requestStartHandler =“main.onRequestStart”

my main handler:
public void function onRequestStart(event)
if ( getPlugin(“sessionStorage”).getVar(“loggedIn”) eq false)
getPlugin(“messagebox”).setMessage(“error”, “Please log in!”);

So if I did this it should redirect to my login page if not logged in right? The messagebox appears and says the please login but the problem is the setnext event never seems to reroute the URL the event.handler requested is displayed.

Any suggestions?



Unless you have it somewhere else, what you have here will just cause a redirect loop right? Because they are not logged in so you would just constantly be redirecting to security.login.


Watch the request with an HTTP sniffer and confirm if the server is coming back with a 302 redirect to your login URL.



ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

I found the issue in my ssl interceptor. Thanks for the help guys.