تشخیص حالت کیوسک
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
برنامههای کیوسک PWA میتوانند تشخیص کیوسک ChromeOS را با Chrome Verified Access API پیادهسازی کنند. این مبتنی بر فناوری دسترسی تأیید شده API موجود است و تنها با چند تفاوت کلیدی که در این راهنما توضیح داده شده است.
برپایی
مراحل راهاندازی مورد نیاز برای استفاده از Verified Access API برای تشخیص حالت کیوسک مانند مواردی است که در پیش نیازهای دسترسی تأیید شده ذکر شده است. چند مرحله اضافی برای راه اندازی و راه اندازی برنامه کیوسک خود در دستگاه Chromebook مدیریت شده وجود دارد.
در Google Admin Console موارد زیر را انجام دهید:
- برای نصب اپلیکیشن کیوسک (مرحله 1) و افزودن پسوند همراه خود به برنامه کیوسک (مرحله 3) این راهنما را دنبال کنید.
- برای برنامه افزودنی همراه کیوسک، تنظیم چالش شرکت مجاز را در مدیریت گواهی فعال کنید
پیاده سازی
سه مؤلفه اصلی برای پیادهسازی تشخیص کیوسک دسترسی تأیید شده وجود دارد: یک برنامه کیوسک PWA، برنامه افزودنی Chrome همراه، و سرویس شبکه.
برنامه کیوسک PWA
PWA برنامه کیوسک اصلی شماست. فرآیند تشخیص حالت کیوسک را با ارسال پیامی به افزونه همراه آغاز میکند و به آن اطلاع میدهد که فرآیند تأیید را شروع کند.
افزونه Chrome Companion
افزونه Chrome همراه با کیوسک PWA اجرا می شود و باید به پیام های دریافتی از PWA گوش دهد. پس از دریافت پیام برای شروع فرآیند تأیید،
- برای ایجاد چالش با Verified Access API تماس بگیرید
- برای ایجاد یک چالش-پاسخ با یک کلید کاربر سازمانی (کاربر حوزه
"USER"
) با API Enterprise.platformKeys در چالش ایجاد شده تماس بگیرید. - درخواستی را با چالش-پاسخ به سرویس شبکه ارسال کنید تا تأیید شود
برای اطلاعات بیشتر و نمونه کد به راهنمای توسعه دهنده مراجعه کنید.
خدمات شبکه
هنگامی که سرویس شبکه شما درخواست تأیید چالش-پاسخ را از برنامه افزودنی دریافت کرد، از روش تأیید استفاده کنید. برای تشخیص حالت کیوسک، expectedIdentity
روی "KIOSK_MODE"
تنظیم کنید. در صورت موفقیت آمیز بودن، باید بدنه پاسخی از یک رشته خالی یا JSON خالی را ببینید، به این معنی که دستگاه در حالت کیوسک است. اگر دستگاه در حالت کیوسک نباشد، یک کد 404 در بدنه پاسخ با پیام خطای "Requested entity was not found"
برگردانده می شود.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003ePWA kiosk apps can utilize the Chrome Verified Access API to detect if a ChromeOS device is in kiosk mode.\u003c/p\u003e\n"],["\u003cp\u003eSetup involves configuring your kiosk app and companion extension in the Google Admin Console, enabling specific settings for enterprise challenge.\u003c/p\u003e\n"],["\u003cp\u003eImplementation requires a PWA kiosk app to initiate verification, a companion Chrome extension to handle the API calls and communication with the network service, and a network service to verify the device's kiosk mode status.\u003c/p\u003e\n"],["\u003cp\u003eThe verification process leverages the Verified Access API to create and validate a challenge-response, confirming kiosk mode if successful.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers should refer to the provided guides and documentation for detailed instructions and code samples to implement this functionality.\u003c/p\u003e\n"]]],[],null,["# Kiosk mode detection\n\nPWA kiosk apps can implement ChromeOS kiosk detection with the Chrome Verified\nAccess API. It builds on the existing Verified Access API technology with just\na few key differences detailed in this guide.\n\nSetup\n-----\n\nThe setup steps needed for using the Verified Access API to do kiosk mode\ndetection are the same as those listed in the\n[prerequisites for Verified Access](/chrome/verified-access/developer-guide#prerequisites_to_verified_access).\nThere are some additional\nsteps to setup and launch your kiosk app on the managed Chromebook device.\n\nIn the [Google Admin Console](https://admin.google.com/), do the following:\n\n- Follow [this guide](https://support.google.com/chrome/a/answer/9781496) to install your kiosk app (step 1) and add your companion extension to the kiosk app (step 3).\n- For the kiosk companion extension, enable the **Allow enterprise challenge** setting under **Certificate management**\n\nImplementation\n--------------\n\nThere are three main components to implement Verified Access kiosk detection: a\nPWA kiosk app, companion Chrome extension, and network service.\n\n### PWA kiosk app\n\nThe PWA is your main kiosk app. It kicks off the process of kiosk mode detection\nby [sending a message to the companion extension](https://chromeos.dev/en/kiosk/connecting-an-extension-from-a-kiosk-pwa),\nletting it know to start the verification process.\n\n### Companion Chrome extension\n\nThe companion Chrome extension runs with the kiosk PWA and should listen to\nincoming messages from the PWA. Upon receiving the message to start the\nverification process,\n\n1. Call the Verified Access API to create a challenge\n2. Call the enterprise.platformKeys API on the generated challenge to create a challenge-response with an Enterprise User Key (user the `\"USER\"` scope)\n3. Send a request with the challenge-response to the network service to be verified\n\nRefer to the [developer guide](/chrome/verified-access/developer-guide)\nfor more information and code samples.\n\n### Network service\n\nWhen your network service receives the request from the extension to verify the\nchallenge-response, use the\n[verify](/chrome/verified-access/reference/rest/v2/challenge/verify) method. For\nkiosk mode detection, set `expectedIdentity` to `\"KIOSK_MODE\"`. If successful,\nyou should see a response body of an empty string or empty JSON, meaning the\ndevice is in kiosk mode. If the device is not in kiosk mode, a 404 code is\nreturned in the response body with error message\n`\"Requested entity was not found\"`."]]