jwt

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToken

func CreateToken(username string) (string, error)

CreateToken generate tokens used for auth

func Setup

func Setup()

Types

type CustomClaims

type CustomClaims struct {
	*jwt.StandardClaims
	CustomerInfo
}

func ParseToken

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

ParseToken parsing token

type CustomerInfo

type CustomerInfo struct {
	UserID string `json:"user_id"`
	Kind   string `json:"kind"`
}

Jump to

Keyboard shortcuts

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