login

package
v1.2.21 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CookieName JWT令牌的Cookie名称
	CookieName = "jwt_token"
)

Variables

This section is empty.

Functions

func Login

func Login(c echo.Context) error

func Logout

func Logout(c echo.Context) error

Logout 登出,删除Cookie中的JWT

Types

type JwtCustomClaims

type JwtCustomClaims struct {
	Username string `json:"username"`
	Admin    bool   `json:"admin"`
	jwt.RegisteredClaims
}

JwtCustomClaims 扩展默认的"JWT声明"。更多示例,请参见https://github.com/golang-jwt/jwt

Jump to

Keyboard shortcuts

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