github-pages-deploy-action/node_modules/@octokit/rest/plugins/authentication/validate.js
James Ives a5a215d318 Revert
2020-06-06 12:27:02 -04:00

22 lines
355 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)}`);
}