Documentation ¶
Index ¶
- Constants
- func GenToken(appId, openid string) (string, error)
- func GetRequestLog(ctx *gin.Context, req, resp interface{}) string
- func HandleRequest(handler func(ctx *beanctx.BizContext) (interface{}, *beanerr.BizError), ...) func(ctx *gin.Context)
- func JWTAuthMiddleware() func(c *gin.Context)
- func NoJWTAuth() func(c *gin.Context)
- func ParseToken(tokenString string) (*beanctx.JwtClaims, error)
- func ValidJwt(ctx *gin.Context) error
- type HttpResponse
Constants ¶
View Source
const ( TokenExpireDuration = time.Hour * 24 * 30 NoJwtKey = "no_jwt" )
Variables ¶
This section is empty.
Functions ¶
func GetRequestLog ¶
func HandleRequest ¶
func JWTAuthMiddleware ¶
JWTAuthMiddleware 基于JWT的认证中间件
Types ¶
type HttpResponse ¶
Click to show internal directories.
Click to hide internal directories.