jwt

package
v0.0.0-...-cde7464 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateJWT

func GenerateJWT() []byte

GenerateJWT creates a new JWT and signs it with the private key

func ValidateJWT

func ValidateJWT(token []byte) error

ValidateJWT validates that the given slice is a valid JWT and the signature matches the public key

Types

type CustomCliams

type CustomCliams struct {
	UserID      string `json:"userId"`
	AccessLevel string `json:"accessLevel"`
	jwt.StandardClaims
}

CustomCliams represents the cliams used to create a JWT token

Jump to

Keyboard shortcuts

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