middlewares

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: MIT Imports: 7 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthMiddleware

type AuthMiddleware struct {
	response.Api
}

func (AuthMiddleware) AuthMiddleware

func (e AuthMiddleware) AuthMiddleware() gin.HandlerFunc

AuthMiddleware 认证中间件

type User

type User struct {
	Issuer        string   `json:"iss"`
	Subject       string   `json:"sub"`
	Audience      string   `json:"aud"`
	ExpiresAt     int64    `json:"exp"`
	IssuedAt      int64    `json:"iat"`
	AtHash        string   `json:"at_hash"`
	Email         string   `json:"email"`
	EmailVerified bool     `json:"email_verified"`
	Groups        []string `json:"groups"`
	Name          string   `json:"name"`
}

func GetLoginUser added in v0.0.3

func GetLoginUser(c *gin.Context) *User

GetLoginUser 获取登录用户

Jump to

Keyboard shortcuts

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