auth

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildJWT

func BuildJWT(apiKey APIKey, service, uri string) (string, error)

BuildJWT constructs and returns the JWT as a string along with an error, if any.

func NewTransport

func NewTransport(apiKey APIKey, t http.RoundTripper) http.RoundTripper

Types

type APIKey

type APIKey struct {
	Name       string `json:"name"`
	PrivateKey string `json:"privateKey"`
}

func LoadAPIKeyFromFile

func LoadAPIKeyFromFile(fileName string) (APIKey, error)

type APIKeyClaims

type APIKeyClaims struct {
	*jwt.Claims
	URI string `json:"uri"`
}

APIKeyClaims holds public claim values for a JWT, as well as a URI.

Jump to

Keyboard shortcuts

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