crypto

package
v0.0.0-...-47484d2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JWTGuard

type JWTGuard interface {
	CheckToken(tokenString string) (userID uint64, err error)
	SignToken(userID uint64, userName string) (string, error)
}

JWTGuard will check visitor's identify and report to business handlers

func NewJWTGuard

func NewJWTGuard(secret string, duration time.Duration) JWTGuard

NewJWTGuard JWTGuard.

func NewStubJWtGuard

func NewStubJWtGuard() JWTGuard

NewStubJWtGuard implements JWTGuard as test stub

Jump to

Keyboard shortcuts

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