Documentation ¶ Index ¶ func CheckSignature(tokenString string, key []byte) (bool, error) func CreateToken(key []byte, payload Payload) (string, error) type Payload func ParseToken(tokenString string, key []byte) (Payload, error) func ParseUnverified(tokenString string) (Payload, error) 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) Source Files ¶ View all Source files jwt.go Click to show internal directories. Click to hide internal directories.