api/auth: create AuthenticatorFunc type, replacing AuthMethod interface