1
0
forked from baron/baron-sso

tenant 삭제 시 RP 허용 테넌트 정리 및 재유입 방지

This commit is contained in:
2026-06-02 18:01:47 +09:00
parent af1f45cc25
commit 80aa60fdf1
5 changed files with 349 additions and 22 deletions

View File

@@ -662,26 +662,7 @@ func tenantAccessPolicyChanged(before, after map[string]any) bool {
}
func (h *DevHandler) revokeClientConsentsForPolicyChange(ctx context.Context, clientID string) error {
if h.ConsentRepo == nil || h.Hydra == nil {
return nil
}
subjects, err := h.ConsentRepo.ListSubjectsByClient(ctx, clientID)
if err != nil {
return err
}
for _, subject := range subjects {
subject = strings.TrimSpace(subject)
if subject == "" {
continue
}
if err := h.Hydra.RevokeConsentSessions(ctx, subject, clientID); err != nil {
return err
}
}
return h.ConsentRepo.DeleteByClient(ctx, clientID)
return revokeClientConsentsForPolicyChange(ctx, h.Hydra, h.ConsentRepo, clientID)
}
func isProtectedSystemClient(client domain.HydraClient) bool {