ביצוע שיחות ב-Credential Manager בשם צדדים אחרים עבור אפליקציות עם הרשאות
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
אפליקציות עם הרשאות מיוחדות, כמו דפדפני אינטרנט, יכולות לבצע קריאה ל-Credential Manager בשם צדדים מסתמכים אחרים על ידי הגדרת הפרמטר origin בשיטות GetCredentialRequest() ו-CreatePublicKeyCredentialRequest() של Credential Manager.
הערך origin מייצג את האפליקציה או האתר שממנו מגיעה הבקשה, והוא משמש את מפתחות הגישה להגנה מפני התקפות פישינג.
השרתים של האפליקציה נדרשים לבדוק את נתוני הלקוח origin מול רשימת ההיתרים של אפליקציות ואתרים מאושרים. אם השרת מקבל בקשה מאפליקציה או מאתר ממקור לא מוכר, הבקשה צריכה להידחות.
במאמר הזה מוסבר איך להגדיר את המקור של אפליקציות כאלה עם הרשאות מיוחדות לביצוע שיחות, ואיך לוודא שהאפליקציות האלה מורשות לבצע שיחות בשם גורמים אחרים.
הגדרת המקור של אפליקציית השיחות
כדי לקבל פרטי כניסה בשם צד נסמך אחר, ספק פרטי הכניסה שסיפק את פרטי הכניסה צריך להוסיף את האפליקציה שלכם לרשימה של מתקשרים עם הרשאות מיוחדות שמורשים לקבל גישה כזו. לאחר מכן, משתמשים ב-setOrigin() בבקשות createCredential() ו-getCredential() כדי להגדיר את הערך origin.
כדי שמנהל הסיסמאות של Google יוכל לטפל בפרטי כניסה של צד שלישי באפליקציות עם הרשאות מיוחדות, כמו דפדפני אינטרנט, צריך לאשר את הטיפול בפרטי הכניסה האלה. כך אפשר לוודא שרק אפליקציות מהימנות יכולות לגשת לפרטי הכניסה של המשתמשים לשירותים חיצוניים ולנהל אותם. כדי לקבל אישור לטיפול בפרטי כניסה של צד שלישי, צריך למלא את טופס הבקשה כדי לפתוח כרטיס ולבקש בדיקה.
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-27 (שעון UTC)."],[],[],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."]]