setup-rust-action/node_modules/@octokit/rest/plugins/authentication/validate.js
Héctor Ramón Jiménez 7f8c3a27a4 Track node_modules
2019-08-15 19:37:37 +02: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)}`)
}