user

package
v0.0.0-...-1369677 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TokenPrefix token前缀
	TokenPrefix = "Bearer "
	// TokenHeader token key
	TokenHeader = "Authorization"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	UID        string `json:"uid"`
	LoginTime  int64  `json:"loginTime"`
	ExpireTime int64  `json:"expireTime"`
}

func Auth

func Auth(token string) *Info

Auth 验证用户身份

func Login

func Login(uid, passwd string) (*Info, string)

Jump to

Keyboard shortcuts

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