jwt

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSignature

func CheckSignature(tokenString string, key []byte) (bool, error)

func CreateToken

func CreateToken(key []byte, payload Payload) (string, error)

Types

type Payload

type Payload struct {
	PlayerID    string `json:"player_id"`
	ServerGroup string `json:"server_group"`
}

func ParseToken

func ParseToken(tokenString string, key []byte) (Payload, error)

func ParseUnverified

func ParseUnverified(tokenString string) (Payload, error)

Jump to

Keyboard shortcuts

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