jwt

package
v0.0.0-...-75b0795 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAudience    = "github.com/planetlabs/kubehook"
	DefaultMaxLifetime = 7 * 24 * time.Hour
)

Defaults for JSON Web Tokens.

Variables

This section is empty.

Functions

func NewManager

func NewManager(secret []byte, mo ...Option) (auth.Manager, error)

NewManager generates and authenticates JSON Web Tokens (JWTs).

Types

type Option

type Option func(*jwtm) error

An Option represents an optional argument to NewBackend

func Audience

func Audience(a string) Option

Audience required to be set in valid JWTs.

func Logger

func Logger(l *zap.Logger) Option

Logger allows the use of a custom Zap logger.

func MaxLifetime

func MaxLifetime(d time.Duration) Option

MaxLifetime is the maximum allowed expiry time for generated tokens.

Jump to

Keyboard shortcuts

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