v1.2.0 修改jwt有效期和获取token接口
This commit is contained in:
@@ -246,6 +246,12 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
Path: "/user/detail",
|
||||
Handler: user.DetailHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// get new token
|
||||
Method: http.MethodPost,
|
||||
Path: "/user/getToken",
|
||||
Handler: user.GetTokenHandler(serverCtx),
|
||||
},
|
||||
},
|
||||
rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
|
||||
rest.WithPrefix("/api/v1"),
|
||||
|
||||
Reference in New Issue
Block a user