Maniac wrote:
- auth app using event system hooks to the save event for models
- auth middleware populates request.user and also keeps the user for
itself in some warm private place
- on model's save it looks in its Meta for fields that should be
populated and does it
Wait, there's more! :-)
In addition to populating private var from middleware auth app can have
some public method to do authentication. And thus work in a totally
non-web environment. It can even require authentication by preventing
model's save if there's no currently authenticated user.
I kinda want to write such a thing if there are no serious objections
and when event system is ready.