jwt

package
v0.0.0-...-c46d5a2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToken

func CreateToken(signingKey []byte, issuer string, hoursDuration int, userId int64) (string, error)

Types

type TagyouClaims

type TagyouClaims struct {
	UserId int64 `json:"userId"`
	jwt.RegisteredClaims
}

func ParseToken

func ParseToken(tokenString string, signingKey []byte) (*jwt.Token, TagyouClaims, error)

type VerificationResult

type VerificationResult struct {
	Valid  bool
	UserId int64
	Err    error
}

func VerifyToken

func VerifyToken(tokenString string, signingKey []byte) VerificationResult

Jump to

Keyboard shortcuts

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