secret

package
v8.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// This header carries the JWT token for gitlab-rails
	RequestHeader = "Gitlab-Workhorse-Api-Request"
)

Variables

View Source
var (
	DefaultClaims = jwt.StandardClaims{Issuer: "gitlab-workhorse"}
)

Functions

func Bytes

func Bytes() ([]byte, error)

Lazy access to the HMAC secret key. We must be lazy because if the key is not already there, it will be generated by gitlab-rails, and gitlab-rails is slow.

func JWTTokenString

func JWTTokenString(claims jwt.Claims) (string, error)

func NewRoundTripper

func NewRoundTripper(next http.RoundTripper, version string) http.RoundTripper

NewRoundTripper creates a RoundTripper that adds the JWT token header to a request. This is used to verify that a request came from workhorse

func SetPath

func SetPath(path string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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