jwtutils

package
v0.0.0-...-700b64f Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_JWT_PUBLIC_KEY_FILE = "/keys/id_ecdsa.pub"
View Source
const INVALID_USERNAME = ""
View Source
const JWT_PUBLIC_KEY_FILE_ENV_VAR = "JWT_PUBLIC_KEY_FILE"

Variables

This section is empty.

Functions

func GetUsernameFromToken

func GetUsernameFromToken(tokenString string) (string, error)

func GetUsernameFromTokenNoVerify

func GetUsernameFromTokenNoVerify(tokenString string) string

func ParseToken

func ParseToken(tokenString string, validate bool) (*jwt.Token, error)

Types

type Fs3JwtClaims

type Fs3JwtClaims struct {
	Username string `json:"user"`
	jwt.RegisteredClaims
}

func GetClaims

func GetClaims(token *jwt.Token) (*Fs3JwtClaims, error)

Jump to

Keyboard shortcuts

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