auth: add basic authentication filter framework

This commit is unfinished and untested.

WORK IN PROGRESS