认证授权主要流程实现

This commit is contained in:
2025-03-18 17:57:07 +08:00
parent 19530d9d40
commit 6ddf1118a5
37 changed files with 2209 additions and 180 deletions

View File

@@ -1,9 +1,21 @@
package web
import (
"platform/web/handlers"
"github.com/gofiber/fiber/v2"
)
func UseRoute(app *fiber.App) {
func ApplyRouters(app *fiber.App) {
api := app.Group("/api")
// 认证路由
auth := api.Group("/auth")
auth.Post("/verify/sms", Protect(), handlers.SmsCode)
auth.Post("/login/sms", Protect(), handlers.Login)
auth.Post("/token", handlers.Token)
// 客户端路由
client := api.Group("/client")
client.Get("/test/create", handlers.CreateClient)
}