mirror of
https://github.com/snowykami/neo-blog.git
synced 2025-09-04 00:06:22 +00:00
⚡ implement OIDC configuration management with CRUD operations, add admin routes, and enhance error handling
This commit is contained in:
12
internal/dto/console.go
Normal file
12
internal/dto/console.go
Normal file
@ -0,0 +1,12 @@
|
||||
package dto
|
||||
|
||||
type AdminOidcConfigDto struct {
|
||||
ID uint `json:"id"`
|
||||
Name string `json:"name"`
|
||||
ClientID string `json:"client_id"`
|
||||
ClientSecret string `json:"client_secret"`
|
||||
DisplayName string `json:"display_name"`
|
||||
Icon string `json:"icon"`
|
||||
OidcDiscoveryUrl string `json:"oidc_discovery_url"`
|
||||
Enabled bool `json:"enabled"`
|
||||
}
|
@ -8,9 +8,9 @@ type PostDto struct {
|
||||
IsPrivate bool `json:"is_private"` // 是否为私密帖子
|
||||
}
|
||||
|
||||
type CreatePostReq struct {
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
Labels []LabelDto `json:"labels"`
|
||||
IsPrivate bool `json:"is_private"`
|
||||
type CreateOrUpdatePostReq struct {
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
IsPrivate bool `json:"is_private"`
|
||||
Labels []uint `json:"labels"` // 标签ID列表
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ type UserDto struct {
|
||||
Role string `json:"role"`
|
||||
}
|
||||
|
||||
type OidcConfigDto struct {
|
||||
type UserOidcConfigDto struct {
|
||||
Name string `json:"name"` // OIDC配置名称
|
||||
DisplayName string `json:"display_name"` // OIDC配置显示名称
|
||||
Icon string `json:"icon"` // OIDC配置图标URL
|
||||
@ -62,7 +62,7 @@ type OidcLoginResp struct {
|
||||
}
|
||||
|
||||
type ListOidcConfigResp struct {
|
||||
OidcConfigs []OidcConfigDto `json:"oidc_configs"` // OIDC配置列表
|
||||
OidcConfigs []UserOidcConfigDto `json:"oidc_configs"` // OIDC配置列表
|
||||
}
|
||||
|
||||
type GetUserReq struct {
|
||||
|
Reference in New Issue
Block a user