Skip to content

Instantly share code, notes, and snippets.

@vjeantet
vjeantet / jira_oauth.go
Created March 11, 2017 12:17 — forked from Lupus/jira_oauth.go
Example of using OAuth authentication with JIRA in Go
package main
import (
"crypto/x509"
"encoding/json"
"encoding/pem"
"fmt"
"net/http"
"net/url"
"os"
@vjeantet
vjeantet / gist:bbbbb39ca7ca4b48d4ff54d73cf2a667
Created March 6, 2017 22:01 — forked from lukecyca/gist:907c4a62758c068fd464
Impersonating a user with the JIRA API
"""
Example of making a request to JIRA as a trusted application.
In this example, we create a new issue as an arbitrary user.
More information on this technique at:
https://answers.atlassian.com/questions/247528/how-do-you-impersonate-a-user-with-jira-oauth
"""
import oauth2
import time