This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
La proprietà credentials
dell'interfaccia Navigator
restituisce un interfaccia CredentialsContainer
, la quale espone metodi utili per fare request-credentials. L'interfaccia CredentialsContainer
inoltre notifica louser agent quando un avviene un evento di interesse, come, ad esempio, un sign-in o un sign-out avvenuto con successo. Questa interfaccia può essere utilizzata per scoprire la presenza della funzionalità.
Sintassi
var credentialsContainer = navigator.credentials
Value
Un'interfaccia CredentialsContainer
.
Esempio
if ('credentials' in navigator) {
navigator.credentials.get({password: true})
.then(function(creds) {
// Usa le credenziali.
});
} else {
// Gestisci il sign-in alternativo, senza credentials.
};
Specifica
Specifica | Stato | Commenti |
---|---|---|
Credential Management Level 1 | Working Draft | Definizione iniziale. |
Browser compatibili
BCD tables only load in the browser
La tabella di compatiilità di questa pagina è generata tramite dati strutturati. Se vuoi contribuire per favore consulta https://github.com/mdn/browser-compat-data e crea una pull request.