auth

package
v0.0.0-...-bd22ede Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PrivateKey = `` /* 1704-byte string literal not displayed */
View Source
var PubKey = `` /* 451-byte string literal not displayed */

Functions

func EncodeUser

func EncodeUser(u User) (string, error)

func GetJwtToken

func GetJwtToken(secretKey string, iat, seconds int64, user User) (string, error)

Types

type User

type User interface {
	GetMid() int64
}

func DecodeUser

func DecodeUser(s string) (User, error)

func NewUser

func NewUser(mid int64) User

Jump to

Keyboard shortcuts

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