차량 모니터 인증 유지와 복귀 링크를 정리
This commit is contained in:
@@ -15,6 +15,7 @@ Car는 차량 모뎀/게이트웨이에서 받은 상태를 수집해 DB에 저
|
|||||||
- 허용된 차량 명령 TCP 전송
|
- 허용된 차량 명령 TCP 전송
|
||||||
- monitor 화면과 AJAX 상태 갱신
|
- monitor 화면과 AJAX 상태 갱신
|
||||||
- monitor 화면 WakeLock, 언어, 테마 토글
|
- monitor 화면 WakeLock, 언어, 테마 토글
|
||||||
|
- monitor 좌측 상단 블로그 복귀 링크
|
||||||
- 모바일 및 좁은 카드 폭에 맞춘 사용량 2줄 배치, 로그 가로 스크롤, 시간 문구 축약
|
- 모바일 및 좁은 카드 폭에 맞춘 사용량 2줄 배치, 로그 가로 스크롤, 시간 문구 축약
|
||||||
- 사용량/요금 표시와 보정 metadata
|
- 사용량/요금 표시와 보정 metadata
|
||||||
- 4.95초 UI timeout과 60초 사용량 정산 분리
|
- 4.95초 UI timeout과 60초 사용량 정산 분리
|
||||||
@@ -114,8 +115,9 @@ Worker 교체나 예외 종료로 `processing`, `ui_timeout_pending` 상태가
|
|||||||
|
|
||||||
- 차량 API는 API token 또는 허용 IP 정책을 사용합니다.
|
- 차량 API는 API token 또는 허용 IP 정책을 사용합니다.
|
||||||
- 차량 모니터 화면과 `monitor.php?mode=ajax`, `monitor.php?mode=usage`는 런처 공통 인증 쿠키 또는 사이트 관리자 세션이 유효할 때만 응답합니다.
|
- 차량 모니터 화면과 `monitor.php?mode=ajax`, `monitor.php?mode=usage`는 런처 공통 인증 쿠키 또는 사이트 관리자 세션이 유효할 때만 응답합니다.
|
||||||
- 사이트 관리자 세션이 확인되면 공통 인증 쿠키를 장기로 발급해 PWA에서 반복 인증이 뜨는 일을 줄입니다.
|
- 공통 암호로 로그인한 일반 인증은 30분 유지하고, 사이트 관리자 세션이 확인되면 관리자 장기 쿠키를 발급해 PWA에서 반복 인증이 뜨는 일을 줄입니다.
|
||||||
- 런처 공통 인증은 우선 공통 인증 모듈로 직접 확인하고, 필요 시 `https://chaegeon.com/custom/launcher/api.php?session=1` 응답으로 확인합니다.
|
- 런처 공통 인증은 우선 공통 인증 모듈로 직접 확인합니다. 공통 모듈을 사용할 수 없는 경우에만 `https://chaegeon.com/custom/launcher/api.php?session=1` 응답으로 확인합니다.
|
||||||
|
- 차량 모니터의 브라우저 화면 인증은 런처/나의 찾기와 같은 공통 쿠키를 사용하지만, 차량 단말이 호출하는 `api.php` 인증은 API token과 허용 IP 정책을 사용하는 별도 경로입니다.
|
||||||
- 차량 제어 명령은 허용된 명령 코드로 제한합니다.
|
- 차량 제어 명령은 허용된 명령 코드로 제한합니다.
|
||||||
- Secret 파일은 저장소 밖에서 제한된 권한으로 유지합니다.
|
- Secret 파일은 저장소 밖에서 제한된 권한으로 유지합니다.
|
||||||
- 실제 제어 명령은 최신 상태 조회와 명령 검증 이후에만 전송합니다.
|
- 실제 제어 명령은 최신 상태 조회와 명령 검증 이후에만 전송합니다.
|
||||||
|
|||||||
+29
-2
@@ -553,13 +553,14 @@ function car_monitor_launcher_session(): array
|
|||||||
require_once $commonAuth;
|
require_once $commonAuth;
|
||||||
|
|
||||||
if (function_exists('custom_has_auth_cookie') && custom_has_auth_cookie()) {
|
if (function_exists('custom_has_auth_cookie') && custom_has_auth_cookie()) {
|
||||||
$session = ['authenticated' => true, 'admin' => false];
|
$isAdmin = function_exists('custom_auth_cookie_is_admin') && custom_auth_cookie_is_admin();
|
||||||
|
$session = ['authenticated' => true, 'admin' => $isAdmin];
|
||||||
return $session;
|
return $session;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (function_exists('custom_is_site_admin') && custom_is_site_admin()) {
|
if (function_exists('custom_is_site_admin') && custom_is_site_admin()) {
|
||||||
if (function_exists('custom_issue_auth_cookie')) {
|
if (function_exists('custom_issue_auth_cookie')) {
|
||||||
custom_issue_auth_cookie();
|
custom_issue_auth_cookie(true);
|
||||||
}
|
}
|
||||||
$session = ['authenticated' => true, 'admin' => true];
|
$session = ['authenticated' => true, 'admin' => true];
|
||||||
return $session;
|
return $session;
|
||||||
@@ -902,6 +903,31 @@ car_monitor_require_access(false);
|
|||||||
display: flex; justify-content: space-between; align-items: center;
|
display: flex; justify-content: space-between; align-items: center;
|
||||||
padding: 1.5rem 0.5rem; margin-bottom: 0.5rem;
|
padding: 1.5rem 0.5rem; margin-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
|
.blog-back-link {
|
||||||
|
position: fixed;
|
||||||
|
top: 14px;
|
||||||
|
left: 16px;
|
||||||
|
z-index: 1040;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
color: var(--accent-blue);
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 1;
|
||||||
|
text-decoration: none;
|
||||||
|
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
|
||||||
|
}
|
||||||
|
.blog-back-link:hover,
|
||||||
|
.blog-back-link:focus {
|
||||||
|
color: var(--accent-blue);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.blog-back-link .backArrow {
|
||||||
|
font-size: 22px;
|
||||||
|
line-height: 1;
|
||||||
|
transform: translateY(-1px);
|
||||||
|
}
|
||||||
.app-title {
|
.app-title {
|
||||||
font-size: 1.25rem; font-weight: 800; letter-spacing: -0.5px; color: var(--text-primary);
|
font-size: 1.25rem; font-weight: 800; letter-spacing: -0.5px; color: var(--text-primary);
|
||||||
}
|
}
|
||||||
@@ -1290,6 +1316,7 @@ car_monitor_require_access(false);
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<a href="/blog" class="blog-back-link"><span class="backArrow">‹</span> 블로그</a>
|
||||||
<div class="container py-3">
|
<div class="container py-3">
|
||||||
<div class="dashboard-header">
|
<div class="dashboard-header">
|
||||||
<div class="d-flex align-items-center gap-3">
|
<div class="d-flex align-items-center gap-3">
|
||||||
|
|||||||
Reference in New Issue
Block a user