Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 270 Bytes

auth.md

File metadata and controls

15 lines (10 loc) · 270 Bytes

鉴权

Nexframe 实现了默认的基于JWT的鉴权中间件,可以很方便的进行鉴权操作。

参考代码:

   // 创建服务
   srv := nexframe.Server()

   srv.Use(middleware.JwtMiddleware(auth.JwtConfig{
   	SigningKey: secretKey,
   }))