RE: [coldbox:16918] Caching

I’m not sure that this is directly causing your problem, but one issue is that you are persisting an instance youru “Result” model in your security manager, but then you are using it to hold transient data such as errors relating to the current login being processed. Assuming your security manager is a singleton, keep in mind that all concurrent requests to it are sharing the same “result” object.

I’m guessing you’re storing a user object somewhere in a this, variables, or instance (which is really variables.instance) scope inside a singleton.

What’s the code in your UserService.authenticateUser() method.

Also, can I see your DI that injects the sessionStorage plugin into UserService?

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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

I think I understand what you mean about the result object. I just discovered that I could try and login using bogus credentials and it allows me to login and assigns me the persistent user data from session storage so the authenticate user isn’t of much use since it’s just checking the persistent data. I can’t figure out why the user model can reset the loggedIn var in session storage and I’m effectively logged out, but when I log back in it’s getting the persistent sessionStorage data. This is driving me mad.

Also, can I see your DI that injects the sessionStorage plugin into UserService?
Is this what you mean?

Brad,

I’m back. I am having an issue with what you pointed out regarding my result model being persisted, but I’m having trouble figuring out how to get the result model for only the request and not the instance. Any guidance?

Thanks,
Rob