forked from baron/baron-sso
클라이언트 시크릿 DB 모델 정의 및 초기 인프라 설정
This commit is contained in:
@@ -36,6 +36,7 @@ func migrateSchemas(db *gorm.DB) error {
|
||||
&domain.User{},
|
||||
&domain.ApiKey{},
|
||||
&domain.IdentityProviderConfig{},
|
||||
&domain.ClientSecret{},
|
||||
&domain.RelyingParty{},
|
||||
// &domain.UserConsent{}, // TODO: Uncomment when model is ready
|
||||
)
|
||||
|
||||
21
backend/internal/domain/client_secret.go
Normal file
21
backend/internal/domain/client_secret.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package domain
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
)
|
||||
|
||||
// ClientSecret represents the stored client secret for OIDC clients.
|
||||
// Since Hydra only returns the secret once during creation, we store it here.
|
||||
type ClientSecret struct {
|
||||
ClientID string `gorm:"primaryKey;column:client_id"`
|
||||
ClientSecret string `gorm:"column:client_secret;not null"`
|
||||
CreatedAt time.Time `gorm:"column:created_at"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at"`
|
||||
}
|
||||
|
||||
type ClientSecretRepository interface {
|
||||
Upsert(ctx context.Context, clientID, secret string) error
|
||||
GetByID(ctx context.Context, clientID string) (string, error)
|
||||
Delete(ctx context.Context, clientID string) error
|
||||
}
|
||||
@@ -66,6 +66,15 @@ services:
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
adminer:
|
||||
image: adminer
|
||||
container_name: baron_adminer
|
||||
restart: always
|
||||
ports:
|
||||
- "8080:8080"
|
||||
networks:
|
||||
- baron_net
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
clickhouse_data:
|
||||
|
||||
Reference in New Issue
Block a user