Categorygithub.com/raphaeldevs/atlassian-jwt
modulepackage
1.0.0
Repository: https://github.com/raphaeldevs/atlassian-jwt.git
Documentation: pkg.go.dev

# README

atlassian-jwt


atlassian-jwt
JWT library for Atlassian in Go.

Build Status

atlassian-jwt is a library that makes it easy to authenticate with JIRA from a variety of app types.

Installation

go get github.com/rbriski/atlassian-jwt

Usage (with go-jira)

import (
    jira "github.com/andygrunwald/go-jira"
    jwt "github.com/rbriski/atlassian-jwt"
)

c := &jwt.Config{
    Key: "some_key",
    ClientKey: "some_client_key",
    SharedSecret: "so_freakin_secret",
    BaseUrl: "http://example.com",
}

// Pass the JWT client into the library client
jiraClient, _ := jira.NewClient(c.Client(), c.BaseURL)

Examples

There are a number of different ways that an app can authenticate with JIRA. Right now, atlassian-jwt only handles JWT authentication as an add-on.

Using ngrok, you can spin up a working example to authenticate with.

> cd examples/jwt
> BASE_URL=https://<some_string>.ngrok.io go run main.go

# Packages

No description provided by the author

# Structs

AtlassianClaims are all mandatory claims for Atlassian JWT.
Config holds the configuration information for JWT operation between an app and JIRA.
Transport is a http.RoundTripper for tagging requests to Atlassian with a JWT auth header.

# Interfaces

A AuthSetter is anything that can set the authorization header on an http.Request.