jwtservice

package
v0.0.0-...-b4268b7 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthJWT

type AuthJWT struct {
	jwt.StandardClaims
	UserId string `json:"user_id"`
}

type JWTService

type JWTService struct {
	// contains filtered or unexported fields
}

func GetJWTService

func GetJWTService() *JWTService

get service singleton

func (*JWTService) GenerateToken

func (s *JWTService) GenerateToken(data *AuthJWT) (string, error)

func (*JWTService) ParseToken

func (s *JWTService) ParseToken(token string, out *AuthJWT)

func (*JWTService) ValidateToken

func (s *JWTService) ValidateToken(token string) bool

Jump to

Keyboard shortcuts

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