jwt

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidJwtSigningMethod = errors.New("unexpected signing method")

ErrInvalidJwtSigningMethod represents an error that denotes a JWT token is not signed with a supported encryption method

View Source
var ErrJwtParseFailure = errors.New("jwt parse failed")

ErrJwtParseFailure represents an error denoting that a JWT token could not be parsed properly

Functions

func Verify

func Verify(vjwt *VerifiableJwt) error

Verify parses and verifies the given JWT token; returns an error iff the token validation failed otherwise returns nil

Types

type VerifiableJwt

type VerifiableJwt struct {
	Token     string
	PublicKey *ecdsa.PublicKey
	Aud       string
}

VerifiableJwt A dot encoded JWT token, its expected audience and the ECDSA public key needed to verify the token

Jump to

Keyboard shortcuts

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