认证授权主要流程实现
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user