checkauth.go 230 B

1234567891011121314151617
  1. package middleware
  2. import (
  3. "fmt"
  4. "github.com/gin-gonic/gin"
  5. )
  6. func CheckAuth() gin.HandlerFunc {
  7. return func(context *gin.Context) {
  8. fmt.Println("鉴权中间件")
  9. // TODO...
  10. // 前置中间件
  11. context.Next()
  12. }
  13. }