Files
release-action/node_modules/@octokit/rest/plugins/authentication/validate.js
Nick Cipollo 81af6e69fb
Some checks failed
PR Checks / check_pr (push) Has been cancelled
Prepare 1.6.0 release
2020-03-02 22:24:25 -05: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)}`)
}