1
0
forked from baron/baron-sso

conent 이력 조회 soft delete 및 상태 필드 추가

This commit is contained in:
2026-02-26 12:40:43 +09:00
parent 099a8c768c
commit c8f39c15e0
3 changed files with 46 additions and 17 deletions

View File

@@ -3423,6 +3423,12 @@ func (h *AuthHandler) ListLinkedRps(c *fiber.Ctx) error {
continue
}
// 삭제된 권한일 경우
status := "inactive"
if dc.DeletedAt.Valid {
status = "revoked"
}
// Hydra에서 클라이언트 정보 조회 (메타데이터용)
client, err := h.Hydra.GetClient(c.Context(), dc.ClientID)
if err != nil {
@@ -3432,7 +3438,7 @@ func (h *AuthHandler) ListLinkedRps(c *fiber.Ctx) error {
linkedRpSummary: linkedRpSummary{
ID: dc.ClientID,
Name: dc.ClientID,
Status: "inactive",
Status: status,
Scopes: dc.GrantedScopes,
},
lastAuth: dc.UpdatedAt,
@@ -3458,7 +3464,7 @@ func (h *AuthHandler) ListLinkedRps(c *fiber.Ctx) error {
Name: name,
Logo: extractHydraClientLogo(client.Metadata),
URL: clientURL,
Status: "inactive",
Status: status,
Scopes: dc.GrantedScopes,
},
lastAuth: dc.UpdatedAt,