jwt

package
v0.0.0-...-671c73a Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomClaims

type CustomClaims struct {
	Id int64 `json:"id"`
	jwt.RegisteredClaims
}

func BuildCustomClaims

func BuildCustomClaims(id int64, duration, issuer, subject string) (*CustomClaims, error)

type JWT

type JWT struct {
	SigningKey []byte
}

func NewJWT

func NewJWT(key string) *JWT

func (*JWT) CreateToken

func (j *JWT) CreateToken(claims *CustomClaims) (string, error)

func (*JWT) ParseToken

func (j *JWT) ParseToken(tokenString string) (*CustomClaims, error)

Jump to

Keyboard shortcuts

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