完善认证逻辑,添加用户信息 introspect 接口,更新 .gitignore 忽略 scripts 目录

This commit is contained in:
2025-04-26 17:59:34 +08:00
parent 08c88da0ce
commit 3e837b5fec
13 changed files with 67 additions and 1378 deletions

View File

@@ -14,8 +14,18 @@ func ApplyRouters(app *fiber.App) {
auth := api.Group("/auth")
auth.Post("/token", handlers.Token)
auth.Post("/revoke", handlers.Revoke)
auth.Post("/introspect", handlers.Introspect)
auth.Post("/verify/sms", handlers.SmsCode)
// 用户
user := api.Group("/user")
user.Post("/identify", handlers.Identify)
user.Post("/identify/callback", handlers.IdentifyCallback)
user.Post("/recharge/prepare/alipay", handlers.RechargePrepareAlipay)
user.Post("/recharge/confirm/alipay", handlers.RechargeConfirmAlipay)
user.Post("/recharge/prepare/wechat", handlers.RechargePrepareWechat)
user.Post("/recharge/confirm/wechat", handlers.RechargeConfirmWechat)
// 通道
channel := api.Group("/channel")
channel.Post("/create", handlers.CreateChannel)
@@ -38,16 +48,6 @@ func ApplyRouters(app *fiber.App) {
resource.Post("/prepare/wechat", handlers.PrepareResourceByWechat)
resource.Post("/create/wechat", handlers.CreateResourceByWechat)
// 用户
user := api.Group("/user")
user.Post("/get/token", handlers.GetUserByToken)
user.Post("/identify", handlers.Identify)
user.Post("/identify/callback", handlers.IdentifyCallback)
user.Post("/recharge/prepare/alipay", handlers.RechargePrepareAlipay)
user.Post("/recharge/confirm/alipay", handlers.RechargeConfirmAlipay)
user.Post("/recharge/prepare/wechat", handlers.RechargePrepareWechat)
user.Post("/recharge/confirm/wechat", handlers.RechargeConfirmWechat)
// 账单
bill := api.Group("/bill")
bill.Post("/list", handlers.ListBill)