app_auth.go
667 字节
package routers
import (
"github.com/beego/beego/v2/server/web"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/port/beego/controllers"
)
func init() {
//手机模块登录-旧
web.Router("/login/mobile", &controllers.AuthController{}, "Post:MobileLogin")
{
//手机模块登录-新
web.CtrlPost("/v1/auth/authorize", (*controllers.AuthController).Authorize)
web.CtrlPost("/v1/auth/accessToken", (*controllers.AuthController).AccessToken)
web.CtrlPost("/v1/auth/refreshToken", (*controllers.AuthController).RefreshToken)
}
// 手机端登录后获取用户信息
web.CtrlPost("/v2/user/userInfo", (*controllers.AuthController).UserInfos)
}