Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2019年9月.
* Some parts of this feature may have varying levels of support.
安全なコンテキスト用: この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。
CredentialsContainer は資格情報管理 API のインターフェイスで、資格情報をリクエストし、ログインに成功したりログアウトが発生したりしたときに、ユーザーエージェントに通知するメソッドを公開します。このインターフェイスは Navigator.credentials からアクセスできます。
なし。
Promise を返します。これは、指定されたオプションに基づく新しい Credential インスタンスで解決します。 Credential オブジェクトが作成できない場合は null になります。例外が発生すると、 Promise が拒否されることがあります。
CredentialsContainer.get()Promise を返します。これは、指定された引数に一致する Credential インスタンスで解決されます。
CredentialsContainer.preventSilentAccess()現在のオリジンへの今後の訪問で自動ログインを許可するかどうかを指定するフラグを設定し、空の Promise を返します。例えば、ユーザーがウェブサイトからログアウトした後、次回のサイト訪問時に自動的にログインされないようにするために、このメソッドを呼び出すことができます。仕様の以前のバージョンでは、このメソッドは requireUserMediation() と呼ばれていました。 対応の詳しい情報はブラウザーの互換性を参照してください。
CredentialsContainer.store()提供された Credential インスタンスの中にユーザーのための一連の資格情報を格納し、そのインスタンスを Promise で返します。
| Credential Management Level 1 # credentialscontainer |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年10月4日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.