hi-server/apis/admin/auth.api
shanshanzhong c582087c0f refactor: 更新项目引用路径从perfect-panel/ppanel-server到perfect-panel/server
feat: 添加版本和构建时间变量
fix: 修正短信队列类型注释错误
style: 清理未使用的代码和测试文件
docs: 更新安装文档中的下载链接
chore: 迁移数据库脚本添加日志和订阅配置
2025-10-13 01:33:03 -07:00

73 lines
1.6 KiB
Plaintext

syntax = "v1"
info (
title: "Auth Method Management"
desc: "System auth method management"
author: "Tension"
email: "tension@ppanel.com"
version: "0.1.2"
)
import (
"../types.api"
)
type (
UpdateAuthMethodConfigRequest {
Id int64 `json:"id"`
Method string `json:"method"`
Config interface{} `json:"config"`
Enabled *bool `json:"enabled"`
}
GetAuthMethodConfigRequest {
Method string `form:"method"`
}
GetAuthMethodListResponse {
List []AuthMethodConfig `json:"list"`
}
TestSmsSendRequest {
AreaCode string `json:"area_code" validate:"required"`
Telephone string `json:"telephone" validate:"required"`
}
// Test email smtp request
TestEmailSendRequest {
Email string `json:"email" validate:"required"`
}
)
@server (
prefix: v1/admin/auth-method
group: admin/authMethod
middleware: AuthMiddleware
)
service ppanel {
@doc "Get auth method list"
@handler GetAuthMethodList
get /list returns (GetAuthMethodListResponse)
@doc "Get auth method config"
@handler GetAuthMethodConfig
get /config (GetAuthMethodConfigRequest) returns (AuthMethodConfig)
@doc "Update auth method config"
@handler UpdateAuthMethodConfig
put /config (UpdateAuthMethodConfigRequest) returns (AuthMethodConfig)
@doc "Test sms send"
@handler TestSmsSend
post /test_sms_send (TestSmsSendRequest)
@doc "Test email send"
@handler TestEmailSend
post /test_email_send (TestEmailSendRequest)
@doc "Get sms support platform"
@handler GetSmsPlatform
get /sms_platform returns (PlatformResponse)
@doc "Get email support platform"
@handler GetEmailPlatform
get /email_platform returns (PlatformResponse)
}