jwt

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PropJwtPublicKey  = "jwt.key.public"
	PropJwtPrivateKey = "jwt.key.private"
	PropJwtIssue      = "jwt.key.issuer"
)

JWT Configuration Properties

Variables

View Source
var (
	ErrMissingPrivateKey  = errors.New("missing private key")
	ErrMissingPublicKey   = errors.New("missing public key")
	ErrExtractClaimFailed = errors.New("unable to extract claims from token")
)

Functions

func JwtEncode

func JwtEncode(claims jwt.MapClaims, exp time.Duration) (string, error)

func ValidateIssuer

func ValidateIssuer() jwt.ParserOption

Types

type ParsedJwt

type ParsedJwt struct {
	Valid  bool
	Claims jwt.MapClaims
}

func JwtDecode

func JwtDecode(token string) (ParsedJwt, error)

Jump to

Keyboard shortcuts

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