From fdffe8c1057f1a0e322ae41ba909e7ef260a99d6 Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Wed, 9 Jul 2025 10:02:25 +0000 Subject: (김준회) fix: S-GIPS 로그인 - 파라미터 변경, 암호화된 Passwd가 url safe 인코딩되지 않도록 수정 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/users/auth/verifyCredentails.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/users/auth/verifyCredentails.ts b/lib/users/auth/verifyCredentails.ts index a0772343..5764db77 100644 --- a/lib/users/auth/verifyCredentails.ts +++ b/lib/users/auth/verifyCredentails.ts @@ -496,12 +496,14 @@ export async function verifySGipsCredentials( // password를 RSA로 암호화 const encryptedPassword = encryptPasswordWithRSA(password); - // URL에 query parameter 추가 - const params = new URLSearchParams({ - username, - password: encryptedPassword, - }); - const requestUrl = `${sgipsUrl}?${params}`; + // URL에 query parameter 추가 (urlSearchParams 사용하는 경우 URL Safe하게 인코딩하기 때문에 fail 발생함) + const params = { + Id: username, + Passwd: encryptedPassword, + }; + + const requestUrl = `${sgipsUrl}?Id=${params.Id}&Passwd=${params.Passwd}`; + // 1. S-Gips API 호출로 인증 확인 console.log('S-Gips API 요청:', { -- cgit v1.2.3