jwt

package
v0.0.0-...-9bdafd8 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToken

func CreateToken(claims CustomClaims) (string, error)

CreateToken creates a new token

Types

type CustomClaims

type CustomClaims struct {
	Id          int64
	AuthorityId int64
	jwt.StandardClaims
}

private claims, share information between parties that agree on using them CustomClaims Structured version of Claims Section, as referenced at https://tools.ietf.org/html/rfc7519#section-4.1 See examples for how to use this with your own claim types

func ParseToken

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

ParseToken parses the token.

Jump to

Keyboard shortcuts

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