Refactor Word Add-in authentication to use e-Court pass-through; remove Keycloak integration

- Updated documentation to reflect removal of login and transition to e-Court pass-through authentication.
- Modified `authService` to handle authentication via custom properties in documents without user login.
- Adjusted `apiClient` to immediately throw `AuthRequiredError` for invalid tokens, as refresh tokens are no longer applicable.
- Revised UI flow to accommodate new authentication method, including changes to state management and error handling.
- Added new requirements document outlining the add-in workflow and authentication process.
This commit is contained in:
Suphonchai Phoonsawat 2026-10-27 09:44:28 +07:00
parent 6ce071ee14
commit 50af6c10fa
9 changed files with 161 additions and 197 deletions

View file

@ -11,8 +11,10 @@
ผลต่างจากต้นฉบับ:
- taskpane ชี้ที่หน้า Next.js (/docedit/wordaddin) แทน taskpane.html ของ webpack
- ตัด DialogAPI (login ช่วงนี้เป็น mock ไม่มี Keycloak dialog) — เหลือ WordApi 1.5 + OpenBrowserWindowApi
- ตัด AppDomain ของ Keycloak (https://localhost:8443)
- ตัด DialogAPI + AppDomain ของ Keycloak (https://localhost:8443) — ยกเลิก auth ด้วย Keycloak
2026-10-27: ไม่มี login ใน add-in auth เป็น e-Court pass-through (token/owner ใน custom
properties ของไฟล์) requirement set เหลือ WordApi 1.3 + OpenBrowserWindowApi
(ดูรายละเอียดระดับที่ใช้จริงในคอมเมนต์ก่อน <Requirements>)
- Commands.Url ชี้ taskpane URL เดียวกัน (ไม่มี commands.html — ปุ่มเดียวคือ ShowTaskpane)
- คง Id GUID เดิม — เครื่องที่เคย sideload ตัว poc จะถือว่าเป็น add-in ตัวเดิม
-->