jwt

package
v1.28.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PrivateKey = generateKey(1024)

Functions

func Encode

func Encode(t *testing.T, claims Claims) string

func EncodeF

func EncodeF(t *testing.T, mutation func(*Claims)) string

Types

type Claims

type Claims struct {
	jwt.RegisteredClaims
	// aud claim is either a string or an array of strings.
	// https://tools.ietf.org/html/rfc7519#section-4.1.3
	Audience      []string `json:"aud,omitempty"`
	Nonce         string   `json:"nonce,omitempty"`
	Groups        []string `json:"groups,omitempty"`
	EmailVerified bool     `json:"email_verified,omitempty"`
}

Jump to

Keyboard shortcuts

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