From 7402e759857d511add0d3eb19f1fa13cb957c1df Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Wed, 23 Jul 2025 08:55:11 +0000 Subject: (김준회) Knox SSO 스테이지에서 운영으로 변경 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/saml/idp-metadata.ts | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'lib/saml') diff --git a/lib/saml/idp-metadata.ts b/lib/saml/idp-metadata.ts index a33ecad6..30fa1454 100644 --- a/lib/saml/idp-metadata.ts +++ b/lib/saml/idp-metadata.ts @@ -57,25 +57,6 @@ export function normalizeCertificate(cert: string): string { return `-----BEGIN CERTIFICATE-----\n${formattedCert}\n-----END CERTIFICATE-----` } -// 특정 용도의 인증서 가져오기 -export function getCertificateByUse(metadata: IDPMetadata, use: 'signing' | 'encryption'): string { - const cert = metadata.certificates.find(c => c.use === use) - return cert ? normalizeCertificate(cert.certificate) : '' -} - -// 모든 인증서를 PEM 형식으로 변환 -export function getAllCertificatesAsPEM(metadata: IDPMetadata): { use: string; pem: string }[] { - return metadata.certificates.map(cert => ({ - use: cert.use, - pem: normalizeCertificate(cert.certificate) - })) -} - -// 레거시 호환성을 위한 함수 - 첫 번째 인증서를 문자열로 반환 -export function getFirstCertificateAsString(metadata: IDPMetadata): string { - return metadata.certificates[0]?.certificate || '' -} - // SP 메타데이터 생성을 위한 헬퍼 export function getSPEntityId(): string { return process.env.SAML_SP_ENTITY_ID || `${process.env.NEXTAUTH_URL}/saml/metadata` -- cgit v1.2.3