تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تسمح واجهة برمجة التطبيقات FIDO2 لتطبيقات Android بإنشاء بيانات اعتماد قوية وموثَّقة
استنادًا إلى المفتاح العام واستخدامها بغرض مصادقة المستخدمين. تقدّم واجهة برمجة التطبيقات
تنفيذ WebAuthn Client
، الذي يتيح استخدام مصادقة BLE وNFC وUSB roaming (مفاتيح الأمان) بالإضافة إلى مصادقة النظام الأساسي، التي تسمح
للمستخدم بالمصادقة باستخدام بصمة إصبعه أو قفل الشاشة.
يتم التسجيل
مرة واحدة لكل أداة مصادقة لكل حساب، وذلك عندما يربط المستخدم أداة مصادقة بحساب.
يتم التوقيع
عندما يريد الطرف الموثوق به مصادقة مستخدم.
يتطلب كل من التسجيل والتوقيع تفاعل المستخدم.
إمكانية التشغيل التفاعلي مع موقعك الإلكتروني
من السهل السماح للمستخدمين بمشاركة بيانات الاعتماد بسلاسة على موقعك الإلكتروني
وتطبيق Android. ولإجراء ذلك، استخدِم روابط تنقل إلى مواد عرض رقمية.
يمكنك الإفصاح عن عمليات الربط من خلال استضافة ملف روابط التنقل إلى مواد العرض الرقمية بتنسيق JSON على
موقعك الإلكتروني، وإضافة رابط إلى ملف رابط التنقل إلى مواد العرض الرقمية في بيان تطبيقك.
على سبيل المثال، إذا أردت ربط https://example.com بتطبيق Android
com.example.android، إليك 3 خطوات مطلوبة:
الخطوة 1: استضافة assetlinks.json على نطاقك
أنشئ ملف JSON على هذا النحو واستضافه على https://example.com/.well-known/assetlinks.json.
الخطوة 3: أضِف مرجع سلسلة asset_statements إلى ملف strings.xml.
سلسلة asset_statements هي عنصر JSON يحدّد assetlinks.jsonملفّات
التي يجب تحميلها. يجب إلغاء ترميز أي علامات اقتباس أو علامات علامة اقتباس فرنسية تستخدمها في
السلسلة. على سبيل المثال:
تاريخ التعديل الأخير: 2025-03-10 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-03-10 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThe FIDO2 API enables Android apps to utilize strong, attested public key-based credentials for user authentication, supporting BLE, NFC, USB roaming authenticators, and platform authenticators like fingerprint or screen lock.\u003c/p\u003e\n"],["\u003cp\u003eIt facilitates user registration (associating an authenticator with an account) and signing (authenticating a user) through the Fido2ApiClient.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can leverage Digital Asset Links to allow users to seamlessly share credentials between their website and Android application.\u003c/p\u003e\n"],["\u003cp\u003eEstablishing this interoperability involves hosting an assetlinks.json file on the website, linking to it in the app's manifest, and adding an asset_statements string resource to the strings.xml file.\u003c/p\u003e\n"]]],[],null,["# FIDO2 API for Android\n\nThe FIDO2 API allows Android applications to create and use strong, attested\npublic key- based credentials for the purpose of authenticating users. The API\nprovides a [WebAuthn Client](https://www.w3.org/TR/webauthn/#webauthn-client)\nimplementation, which supports the use of BLE, NFC, and USB roaming\nauthenticators (security keys) as well as a platform authenticator, which allows\nthe user to authenticate using their fingerprint or screen lock.\n| **Note:** If your app requires passkeys, you should use [Credential Manager](/identity/android-credential-manager) instead.\n\nIntegration\n-----------\n\nThe [FIDO2 API](https://developers.google.com/android/reference/com/google/android/gms/fido/fido2/package-summary)\nentry point is the [Fido2ApiClient](https://developers.google.com/android/reference/com/google/android/gms/fido/fido2/Fido2ApiClient).\n\nThe API supports two operations:\n\n- [Registration](/android/reference/com/google/android/gms/fido/fido2/Fido2ApiClient#getRegisterIntent(com.google.android.gms.fido.fido2.api.common.MakeCredentialOptions)) is done once per authenticator per account, when the user associates an authenticator with an account.\n- [Signing](/android/reference/com/google/android/gms/fido/fido2/Fido2ApiClient#getSignIntent(com.google.android.gms.fido.fido2.api.common.PublicKeyCredentialRequestOptions)) is done whenever the relying party wants to authenticate a user.\n\nBoth registration and signing require user interaction.\n\nInteroperability with your website\n----------------------------------\n\nIt is simple to allow users to seamlessly share credentials across your website\nand Android application. To do so, leverage [the Digital Asset Links](https://digitalassetlinks.org).\nYou can declare associations by hosting a Digital Asset Links JSON file on your\nwebsite, and adding a link to the Digital Asset Link file to your app's manifest.\n\nFor example, if you want to associate `https://example.com` with an Android app\n`com.example.android`, here's 3 required steps:\n\n### Step 1. Host `assetlinks.json` at your domain\n\nCreate a JSON file like this and host it at `https://example.com/.well-known/assetlinks.json`. \n\n [\n {\n \"relation\" : [\n \"delegate_permission/common.handle_all_urls\",\n \"delegate_permission/common.get_login_creds\"\n ],\n \"target\" : {\n \"namespace\" : \"web\",\n \"site\" : \"https://example.com\"\n }\n },\n {\n \"relation\" : [\n \"delegate_permission/common.handle_all_urls\",\n \"delegate_permission/common.get_login_creds\"\n ],\n \"target\" : {\n \"namespace\" : \"android_app\",\n \"package_name\" : \"com.example.android\",\n \"sha256_cert_fingerprints\" : [\n \"DE:AD:BE:EF\"\n ]\n }\n }\n ]\n\nMake sure it's crawlable from Google and is served with HTTP header\n`Content-Type: application/json`.\n\n`sha256_cert_fingerprints` is the SHA256 fingerprints of your app's signing certificate.\nFind more details in the [Android App Links documentation](https://developer.android.com/training/app-links/verify-site-associations#web-assoc).\n| **Note:** The `relation` will eventually only require `\"delegate_permission/common.get_login_creds\"` in order to share credentials between websites and apps, however, until we complete migrating our logic to accept it, please include both `\"delegate_permission/common.handle_all_urls\"` and `\"delegate_permission/common.get_login_creds\"`.\n\n### Step 2. Link to `assetlinks.json` in Android app\n\nIn your Android app, add the following line to the manifest file under `\u003capplication\u003e`: \n\n \u003cmeta-data android:name=\"asset_statements\" android:resource=\"@string/asset_statements\" /\u003e\n\n### Step 3. Add an `asset_statements` string resource to the strings.xml file\n\nThe `asset_statements` string is a JSON object that specifies the `assetlinks.json`\nfiles to load. You must escape any apostrophes and quotation marks you use in\nthe string. For example: \n\n \u003cstring name=\"asset_statements\" translatable=\"false\"\u003e\n [{\n \\\"include\\\": \\\"https://example.com/.well-known/assetlinks.json\\\"\n }]\n \u003c/string\u003e\n\nTo learn more about associating your app and your website, read the [SmartLock\nfor Passwords on Android documentation](/identity/smartlock-passwords/android/associate-apps-and-sites)."]]