I have a custom library in lib that handles remote authentication to our external auth system via soap. All works well from the controller. However, I feel all this logic should be moved to the model but I dont know how to invoke a method in a library Module from a model. Is this possible? Last resort is to move this logic into the controller, but that just seems to break MVC
Authentication generally isn't a domain responsibility. Thus, I
wouldn't put something like that in a model. Also, the authentication
logic itself probably doesn't belong in the controller. Rather, the
controller can invoke a method on the lib to authenticate the user. If
this is what you're doing already, what's bothering you about it?