middleware

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

View Source
const AUTH_HEADER = "authorization"
View Source
const (
	CONNECT_INSTALL_KEYS_CDN_URL = "https://connect-install-keys.atlassian.com"
)
View Source
const JWT_PARAM = "jwt"

Variables

This section is empty.

Functions

func ExtractJwt added in v0.2.0

func ExtractJwt(r *http.Request) (string, bool)

func NewAuthenticationMiddleware

func NewAuthenticationMiddleware(addon *gonnect.Addon, skipQsh bool) func(h http.Handler) http.Handler

func NewRequestMiddleware

func NewRequestMiddleware(addon *gonnect.Addon, verifiedParameters map[string]string) func(h http.Handler) http.Handler

func NewTokenMiddleware

func NewTokenMiddleware(addon *gonnect.Addon) func(h http.Handler) http.Handler

func NewVerifyInstallationMiddleware

func NewVerifyInstallationMiddleware(addon *gonnect.Addon) func(h http.Handler) http.Handler

func ValidateQshFromRequest added in v0.2.0

func ValidateQshFromRequest(claims jwt.MapClaims, r *http.Request, addon *gonnect.Addon, skipQsh bool) bool

Types

type AuthenticationMiddleware

type AuthenticationMiddleware struct {
	// contains filtered or unexported fields
}

func (AuthenticationMiddleware) ServeHTTP

type RequestMiddleware

type RequestMiddleware struct {
	// contains filtered or unexported fields
}

func (RequestMiddleware) ServeHTTP

func (h RequestMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request)

type TokenMiddleware

type TokenMiddleware struct {
	// contains filtered or unexported fields
}

func (TokenMiddleware) ServeHTTP

func (h TokenMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request)

type VerifyInstallationMiddleware

type VerifyInstallationMiddleware struct {
	// contains filtered or unexported fields
}

func (VerifyInstallationMiddleware) ServeHTTP

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL