service

package
v0.0.0-...-f5f9226 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseToken

func ParseToken(tokenString string) (interface{}, error)

Types

type JWTManager

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

func NewJWTManager

func NewJWTManager(secretKey string, tokenDuration time.Duration) *JWTManager

func (*JWTManager) Generate

func (manager *JWTManager) Generate(user *model.User) (string, error)

type UserClaims

type UserClaims struct {
	jwt.StandardClaims
	Username string `json:"username"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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