إجراء مكالمات "مدير بيانات الاعتماد" بالنيابة عن جهات أخرى للحصول على التطبيقات المميّزة
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يمكن للتطبيقات المميزة، مثل متصفِّحات الويب، طلب "مدير بيانات الاعتماد" نيابةً عن جهات أخرى معتمَدة من خلال ضبط المَعلمة origin في طريقتَي GetCredentialRequest() وCreatePublicKeyCredentialRequest() في "مدير بيانات الاعتماد".
تمثل origin التطبيق أو الموقع الإلكتروني الذي يأتي منه الطلب، ويتم استخدامها من خلال مفاتيح المرور للحماية من هجمات التصيّد الاحتيالي.
يجب أن تتحقّق خوادم التطبيق من origin لبيانات العميل بالرجوع إلى القائمة المسموح بها للتطبيقات والمواقع الإلكترونية التي تمت الموافقة عليها. وإذا كان الخادم يتلقى طلبًا من تطبيق أو موقع إلكتروني من مصدر غير معروف، من المفترض أن يتم رفض الطلب.
يوضّح هذا المستند طريقة تحديد مصدر تطبيقات الاتصال المميّزة هذه، وكيفية التحقّق من أنّ هذه التطبيقات مسموح لها بإجراء مكالمات نيابةً عن جهات أخرى.
ضبط مصدر تطبيق الاتصال
للحصول على بيانات الاعتماد نيابةً عن جهة أخرى معتمَدة، على موفِّر بيانات الاعتماد الذي يوفّر بيانات الاعتماد إضافة تطبيقك إلى قائمة المتصلين المميّزين المسموح لهم بالوصول إلى هذه البيانات. بعد ذلك، يمكنك استخدام السمة setOrigin() في طلبات
createCredential() وgetCredential() لضبط قيمة
origin.
بالنسبة إلى التطبيقات المميّزة، مثل متصفِّحات الويب التي تحتاج إلى التعامل مع بيانات اعتماد تابعة لجهات خارجية، تطلب خدمة "مدير كلمات المرور في Google" الحصول على موافقة لمعالجة بيانات الاعتماد هذه. يضمن ذلك أن التطبيقات الموثوق بها فقط هي القادرة على الوصول إلى بيانات اعتماد المستخدم للخدمات الخارجية وإدارتها. للحصول على الموافقة على معالجة بيانات اعتماد الجهات الخارجية،
يُرجى ملء نموذج الطلب لفتح طلب دعم
ومراجعة طلبك.
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Make Credential Manager calls on behalf of other parties for privileged apps\n\nPrivileged apps such as web browsers can make a Credential Manager call on\nbehalf of other relying parties by setting the `origin` parameter in Credential\nManager's [`GetCredentialRequest()`](/reference/androidx/credentials/GetCredentialRequest#GetCredentialRequest(kotlin.collections.List,kotlin.String,kotlin.Boolean,android.content.ComponentName,kotlin.Boolean)) and\n[`CreatePublicKeyCredentialRequest()`](/reference/androidx/credentials/CreatePublicKeyCredentialRequest#CreatePublicKeyCredentialRequest(kotlin.String,kotlin.ByteArray,kotlin.Boolean,kotlin.String,kotlin.Boolean)) methods.\n\nThe [`origin`](https://www.w3.org/TR/webauthn-2/#dom-collectedclientdata-origin) represents the application or website that a\nrequest comes from, and is used by passkeys to protect against phishing attacks.\nAn app's servers are required to check the client data `origin` against an\nallowlist of approved apps and websites. If the server receives a request from\nan app or website from an unrecognized origin, the request should be rejected.\nThis document describes how to set the origin for such privileged calling apps,\nand how to verify such apps are allowed to make calls on behalf of other\nparties.\n\nSet the origin of the calling app\n---------------------------------\n\nTo get credentials on behalf of another relying party, the credential provider\nthat supplies the credentials must add your app to a list of privileged callers\nthat are allowed to get such access. Then, use [`setOrigin()`](/reference/android/credentials/GetCredentialRequest.Builder#setOrigin(java.lang.String)) on\n[`createCredential()`](/reference/kotlin/androidx/credentials/CredentialManager#createCredential(android.content.Context,androidx.credentials.CreateCredentialRequest)) and [`getCredential()`](/reference/kotlin/androidx/credentials/CredentialManager#getCredential(android.content.Context,androidx.credentials.PrepareGetCredentialResponse.PendingGetCredentialHandle)) requests to set the\n`origin` value.\n| **Note:** The `origin` parameter in the `createCredential()` and `getCredential()` methods is only effective in API levels 34 (Android 14) and higher.\n\nFor privileged apps such as web browsers that need to handle third party\ncredentials, Google Password Manager requires approval to handle those\ncredentials. This ensures that only trusted apps are able to access and manage\nuser credentials for external services. To be approved for handling third party\ncredentials, [complete the request form](https://docs.google.com/forms/d/e/1FAIpQLScRuk9tTg0QPfSWl9SbpbIorX8xx2FCXlmoUYftCX2MxG4qyg/viewform) to open a ticket and\nhave your request reviewed."]]