Initial code for bsd-api-auth