This repository has been archived on 2026-08-26. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2019-08-06 18:29:44 -04:00

22 lines
350 B
JavaScript

module.exports = validateAuth
function validateAuth (auth) {
if (typeof auth === 'string') {
return
}
if (typeof auth === 'function') {
return
}
if (auth.username && auth.password) {
return
}
if (auth.clientId && auth.clientSecret) {
return
}
throw new Error(`Invalid "auth" option: ${JSON.stringify(auth)}`)
}