Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtlassianClaims ¶
type AtlassianClaims struct { QSH string `json:"qsh"` jwt.StandardClaims }
AtlassianClaims are all mandatory claims for Atlassian JWT
type AuthSetter ¶
type AuthSetter interface { // SetAuthHeader takes a request pointer and sets the // Authorization header with a valid Atlassian JWT SetAuthHeader(*http.Request) error }
A AuthSetter is anything that can set the authorization header on an http.Request
type Config ¶
type Config struct { // Key holds the app key described in the Atlassian Connect // JSON file Key string // ClientKey holds the key that JIRA returns to validate JWT // tokens from Jira ClientKey string SharedSecret string // BaseURL is the base URL of the JIRA instance BaseURL string }
Config holds the configuration information for JWT operation between an app and JIRA
func (*Config) Claims ¶
func (c *Config) Claims(qsh string) *AtlassianClaims
Claims returns a valid set of claims for creating an Atlassian JWT
func (*Config) Client ¶
Client returns an *http.Client that makes requests that are authenticated using Atlassian JWT authentication
func (*Config) QSH ¶
QSH returns the query string hash for this request https://developer.atlassian.com/cloud/bitbucket/query-string-hash/
func (*Config) SetAuthHeader ¶
SetAuthHeader takes a request pointer and sets the Authorization header with a valid Atlassian JWT
type Transport ¶
type Transport struct { // SetAuth sets the // Authorization headers. Config AuthSetter // Base is the base RoundTripper used to make HTTP requests. // If nil, http.DefaultTransport is used. Base http.RoundTripper }
Transport is a http.RoundTripper for tagging requests to Atlassian with a JWT auth header