-- Leo's gemini proxy

-- Connecting to godocs.io:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

package jira - golang.org/x/oauth2/jira - godocs.io


import "golang.org/x/oauth2/jira"

Package jira provides claims and JWT signing for OAuth2 to access JIRA/Confluence.


Types


type ClaimSet

type ClaimSet struct {
	Issuer       string `json:"iss"`
	Subject      string `json:"sub"`
	InstalledURL string `json:"tnt"` // URL of installed app
	AuthURL      string `json:"aud"` // URL of auth server
	ExpiresIn    int64  `json:"exp"` // Must be no later that 60 seconds in the future
	IssuedAt     int64  `json:"iat"`
}

ClaimSet contains information about the JWT signature according to Atlassian's documentation https://developer.atlassian.com/cloud/jira/software/oauth-2-jwt-bearer-token-authorization-grant-type/


type Config

type Config struct {
	// BaseURL for your app
	BaseURL string

	// Subject is the userkey as defined by Atlassian
	// Different than username (ex: /rest/api/2/user?username=alex)
	Subject string

	oauth2.Config
}

Config is the configuration for using JWT to fetch tokens, commonly known as "two-legged OAuth 2.0".


func (*Config) Client

func (c *Config) Client(ctx context.Context) *http.Client

Client returns an HTTP client wrapping the context's HTTP transport and adding Authorization headers with tokens obtained from c.


The returned client and its Transport should not be modified.


func (*Config) TokenSource

func (c *Config) TokenSource(ctx context.Context) oauth2.TokenSource

TokenSource returns a JWT TokenSource using the configuration in c and the HTTP client from the provided context.


Details

Version: v0.20.0 (latest)

Published: Apr 22, 2024

Platform: linux/amd64

Imports: 13 packages

Last checked: 7 hours ago

Refresh now


Back to home

Search

-- Response ended

-- Page fetched on Mon Jun 3 01:45:29 2024