refactor: System2/3, User Management SSO 인증 통합

- System2 신고: SSO JWT 인증 전환, API base 정리
- System3 부적합: SSO 인증 매니저 통합, 권한 체계 정비
- User Management: SSO 토큰 기반 사용자 관리 API 연동

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-06 23:18:23 +09:00
parent 61c810bd47
commit 11cffbd920
26 changed files with 528 additions and 1824 deletions

View File

@@ -3,20 +3,28 @@
* M-Project 작업보고서 시스템
*/
const CACHE_NAME = 'mproject-v1.0.3';
const STATIC_CACHE = 'mproject-static-v1.0.3';
const DYNAMIC_CACHE = 'mproject-dynamic-v1.0.3';
const CACHE_NAME = 'mproject-v1.1.0';
const STATIC_CACHE = 'mproject-static-v1.1.0';
const DYNAMIC_CACHE = 'mproject-dynamic-v1.1.0';
// 캐시할 정적 리소스
const STATIC_ASSETS = [
'/',
'/index.html',
'/app.html',
'/issue-view.html',
'/daily-work.html',
'/project-management.html',
'/admin.html',
'/issues-dashboard.html',
'/issues-inbox.html',
'/issues-management.html',
'/issues-archive.html',
'/ai-assistant.html',
'/reports.html',
'/reports-daily.html',
'/reports-weekly.html',
'/reports-monthly.html',
'/static/js/api.js',
'/static/js/app.js',
'/static/js/core/permissions.js',
'/static/js/core/auth-manager.js',
'/static/js/components/common-header.js',
'/static/js/core/page-manager.js',
'/static/js/core/page-preloader.js',
@@ -60,20 +68,20 @@ const CACHE_STRATEGIES = {
* 서비스 워커 설치
*/
self.addEventListener('install', (event) => {
console.log('🔧 서비스 워커 설치 중...');
console.log(' 서비스 워커 설치 중...');
event.waitUntil(
caches.open(STATIC_CACHE)
.then((cache) => {
console.log('📦 정적 리소스 캐싱 중...');
console.log(' 정적 리소스 캐싱 중...');
return cache.addAll(STATIC_ASSETS);
})
.then(() => {
console.log(' 서비스 워커 설치 완료');
console.log(' 서비스 워커 설치 완료');
return self.skipWaiting();
})
.catch((error) => {
console.error(' 서비스 워커 설치 실패:', error);
console.error(' 서비스 워커 설치 실패:', error);
})
);
});
@@ -82,7 +90,7 @@ self.addEventListener('install', (event) => {
* 서비스 워커 활성화
*/
self.addEventListener('activate', (event) => {
console.log('🚀 서비스 워커 활성화 중...');
console.log(' 서비스 워커 활성화 중...');
event.waitUntil(
caches.keys()
@@ -93,14 +101,14 @@ self.addEventListener('activate', (event) => {
if (cacheName !== STATIC_CACHE &&
cacheName !== DYNAMIC_CACHE &&
cacheName !== CACHE_NAME) {
console.log('🗑️ 이전 캐시 삭제:', cacheName);
console.log(' 이전 캐시 삭제:', cacheName);
return caches.delete(cacheName);
}
})
);
})
.then(() => {
console.log(' 서비스 워커 활성화 완료');
console.log(' 서비스 워커 활성화 완료');
return self.clients.claim();
})
);
@@ -251,7 +259,7 @@ function isCDNResource(url) {
async function handleOffline(request) {
// HTML 요청에 대한 오프라인 페이지
if (request.destination === 'document') {
const offlinePage = await caches.match('/index.html');
const offlinePage = await caches.match('/app.html');
if (offlinePage) {
return offlinePage;
}
@@ -308,7 +316,7 @@ async function clearAllCaches() {
await Promise.all(
cacheNames.map(cacheName => caches.delete(cacheName))
);
console.log('🗑️ 모든 캐시 정리 완료');
console.log(' 모든 캐시 정리 완료');
}
/**
@@ -318,7 +326,7 @@ async function cachePage(url) {
try {
const cache = await caches.open(DYNAMIC_CACHE);
await cache.add(url);
console.log('📦 페이지 캐시 완료:', url);
console.log(' 페이지 캐시 완료:', url);
} catch (error) {
console.error('페이지 캐시 실패:', url, error);
}