hookshot/oauth.ts
Will Hunt 7837cbb0f2
Refactor JIRA to support on-prem (#187)
* JIRA refactors

* Support JIRA onprem

* Fix webhooks

* More JIRA docs --- PLEASE REWRITE MEEEE ---

* Drop manifest code for now

* Add on-prem instructions

* Remove incomplete command

* Update sample config

* Remove null url
2022-03-04 14:34:44 +00:00

15 lines
344 B
TypeScript

import { readFileSync } from 'fs';
import JiraApi, { SearchUserOptions } from 'jira-client';
import * as f from 'oauth-sign';
// Step 1. Sign the request
f()
const api = new JiraApi({
host: 'localhost',
port: 9050,
oauth: {
consumer_key: '',
consumer_secret: readFileSync('jira_privatekey.pem', 'utf-8')
}
});