fix: use supported redirect mode for Workers organization requests
Deploy EG-BIM QA Gateway / deploy (push) Successful in 1m24s
Deploy EG-BIM QA Gateway / deploy (push) Successful in 1m24s
This commit is contained in:
1 parent
c87e0aa0c1
commit
ccf48c8224
8 files changed
+126
-4
No files matched your search
@@ -119,6 +119,8 @@ Worker는 서명된 세션의 사용자 UUID로 소속을 찾습니다. 조회
|
||||
|
||||
조직 조회가 실패하면 기존 세션·글쓰기 흐름과 확인된 SSO 정보를 유지합니다. 누락되거나 모호한 사용자는 `orgContextStatus`로 구분하고 다른 작성자의 정보를 대신 쓰지 않습니다. 로그인 후 `/auth/session`의 `user.orgContextStatus=unavailable`이면 `user.orgContextError`에서 허용된 오류 코드만 확인할 수 있습니다. `org_context_missing_credentials`는 Worker의 조직 API 키 누락, `org_context_http_401`은 API 인증 거부, `org_context_http_403`은 API 접근 거부, `org_context_timeout`은 요청 시간 초과를 뜻합니다. 알 수 없는 오류는 `org_context_unavailable`로 표시하며 키·원본 오류 메시지·조직 디렉터리는 응답에 넣지 않습니다. 조회가 정상화되면 이전 `orgContextError`는 제거됩니다. HTTP 200이나 요청 로그의 `outcome=ok`만으로 조직 조회 성공을 판단하지 않습니다.
|
||||
|
||||
조직 API는 Workers가 지원하는 `redirect: manual`로 호출하고, 3xx 응답은 실패 처리해 다른 주소로 인증 헤더를 전달하지 않습니다. Workers에서는 `redirect: error`가 요청 전 TypeError를 발생시킵니다. `npm test`에는 설치된 workerd로 실제 `/auth/session` 경로를 실행하는 검사가 포함됩니다. 외부 API는 로컬 모의 서비스로 대체하며 조직 매핑과 리다이렉트 거부를 함께 확인합니다.
|
||||
|
||||
로컬 검증:
|
||||
|
||||
```sh
|
||||
|
||||
Reference in new issue
Block a user