forked from baron/baron-sso
conent 이력 조회 soft delete 및 상태 필드 추가
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user