mirror of
https://github.com/actions/setup-node.git
synced 2025-12-16 01:51:49 +08:00
.
This commit is contained in:
18
node_modules/@octokit/rest/plugins/authentication/validate.js
generated
vendored
18
node_modules/@octokit/rest/plugins/authentication/validate.js
generated
vendored
@@ -1,21 +1,21 @@
|
||||
module.exports = validateAuth
|
||||
module.exports = validateAuth;
|
||||
|
||||
function validateAuth (auth) {
|
||||
if (typeof auth === 'string') {
|
||||
return
|
||||
function validateAuth(auth) {
|
||||
if (typeof auth === "string") {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof auth === 'function') {
|
||||
return
|
||||
if (typeof auth === "function") {
|
||||
return;
|
||||
}
|
||||
|
||||
if (auth.username && auth.password) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
if (auth.clientId && auth.clientSecret) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
throw new Error(`Invalid "auth" option: ${JSON.stringify(auth)}`)
|
||||
throw new Error(`Invalid "auth" option: ${JSON.stringify(auth)}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user