jwt

package
v0.0.0-...-a00ab96 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	ClaimsOut

	jwt.StandardClaims
	// contains filtered or unexported fields
}

func NewClaims

func NewClaims(userId int, loginName string) *Claims

func (*Claims) Generate

func (c *Claims) Generate() (token string, err error)

func (*Claims) Parse

func (c *Claims) Parse(token string) (*ClaimsOut, error)

func (*Claims) SetIssuer

func (c *Claims) SetIssuer(issuer string) *Claims

func (*Claims) SetJwtSecret

func (c *Claims) SetJwtSecret(secret string) *Claims

func (*Claims) SetSubject

func (c *Claims) SetSubject(subject string) *Claims

type ClaimsOut

type ClaimsOut struct {
	UserId    int    `json:"user_id"`
	LoginName string `json:"login_name"`
}

Jump to

Keyboard shortcuts

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