diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/saml/idp-metadata.ts | 19 |
1 files changed, 0 insertions, 19 deletions
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` |
