Re:The M in MVC: Why Models are Misunderstood and Unappreciated
by bergie on Tuesday July 26, 2011 @09:53AM
(#2807309)
Agreed, that is a better scenario.
Then again, stuff like authentication and authorization (two separate concepts!) are often better handled on some middleware or service layer than in models and controllers.
User.authorize(username, password) -> Returns true if valid username/password -> Returns false if username/password do not match -> Raises AccountDisabled if username/password valid but account disabled
The normal login failure case is not exceptional - but the others are.