mirror of
https://github.com/github/codeql-action.git
synced 2025-12-26 17:20:10 +08:00
19 lines
464 B
JavaScript
19 lines
464 B
JavaScript
import { request as defaultRequest } from "@octokit/request";
|
|
async function deleteToken(options) {
|
|
const request = options.request || defaultRequest;
|
|
const auth = btoa(`${options.clientId}:${options.clientSecret}`);
|
|
return request(
|
|
"DELETE /applications/{client_id}/token",
|
|
{
|
|
headers: {
|
|
authorization: `basic ${auth}`
|
|
},
|
|
client_id: options.clientId,
|
|
access_token: options.token
|
|
}
|
|
);
|
|
}
|
|
export {
|
|
deleteToken
|
|
};
|