[ColdBox 4.3.0] Customised Module for Login validation


I am reviewing some of the code I wrote in ColdBox. Then, it occurred to me whether it is possible to create a module for login validation. Since we have so many login validation methods (openAuth, captcha, two factor authentication, passwordless authentication…), I wonder if it is possible to create a separate application contain those methods. And then I can put it inside any system as a module for further use and no need to write login function anymore in the future.

This is the first time I am thinking about building a customised module.I have create several projects with some module provided by ColdBox but I have little experience in creating my own. For login validation, what possible difficulty I can think about so far may involve session management, relation with the database setting (user info is saved in db). I wonder if it is feasible. I appreciate if anyone could offer any suggestions.


Well… we are on the same boat. I was about to rewrite the admin section of my app in a module; and this would be my first time to write a module.

Regarding authentication module, awhile ago I used cbSocialite (ForgeBox: cbSocialite). Perhaps, you could learn from it how module is structured.

This is a good idea. I have done something like that with CF2016 using the cflogin framework. Now that I am migrating this application to Coldbox, my intention is to transpose what I currently have with CF2016, which means having cflogin work with Coldbox as a first step. Next step would be to explore further with Coldbox cbSecurity module, and build a fully MVC compliant authentication and authorisation module.

I am sorry for the late reply. Just get back to work after a few days off.

Thank you for your reference. I will look into that. ^^

And good luck to your work!