feat(user): 实现基础用户系统
- 实现用户手机验证码、密码登录功能,支持 JWT 认证 - 实现用户注册功能 - 实现jwt中获取用户信息
This commit is contained in:
@@ -27,10 +27,16 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
// login
|
||||
// mobile code login
|
||||
Method: http.MethodPost,
|
||||
Path: "/user/login",
|
||||
Handler: user.LoginHandler(serverCtx),
|
||||
Path: "/user/mobileCodeLogin",
|
||||
Handler: user.MobileCodeLoginHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// mobile login
|
||||
Method: http.MethodPost,
|
||||
Path: "/user/mobileLogin",
|
||||
Handler: user.MobileLoginHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// register
|
||||
|
||||
Reference in New Issue
Block a user