Files
Superalgos/node_modules/@octokit/rest/lib/plugins/authentication/index.js
T

13 lines
341 B
JavaScript

module.exports = authenticationPlugin
const authenticate = require('./authenticate')
const beforeRequest = require('./before-request')
function authenticationPlugin (octokit) {
const state = {
auth: false
}
octokit.authenticate = authenticate.bind(null, state)
octokit.hook.before('request', beforeRequest.bind(null, state))
}