Credential Management API - Web APIs 编辑

Experimental

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The Credential Management API lets a website store and retrieve password, public key, and federated credentials. These capabilities allow users to sign in without typing passwords, see the federated account they used to sign in to a site, and resume a session without the explicit sign-in flow of an expired session.

Credential management concepts and usage

This API lets websites interact with a user agent’s password system directly so that websites can deal in a uniform way with site credentials and user agents can provide better assistance with the management of their credentials. For example, user agents have a particularly hard time dealing with federated identity providers or esoteric sign-in mechanisms.

To address these problems, the Credential Management API provides ways for a website to store and retrieve different types of credentials. This gives users capabilities such as seeing the federated account they used to sign on to a site, or resuming a session without the explicit sign-in flow of an expired session.

This API is restricted to top-level contexts. Calls to get() and store() within an <iframe> element will resolve without effect.

Subdomain-shared credentials

Later version of the spec allow credentials to be retrieved from a different subdomain. For example, a password stored in login.example.com may be used to log in to www.example.com. To take advantage of this, a password must be explicitly stored by calling CredentialsContainer.store(). This is sometimes referred to as public suffix list (PSL) matching; however the spec only recommends using PSL to determine the effective scope of a credential. It does not require it. Hence browsers may vary in their implementation.

Interfaces

Credential
Provides information about an entity as a prerequisite to a trust decision.
CredentialsContainer
Exposes methods to request credentials and notify the user agent when interesting events occur such as successful sign in or sign out. This interfaces is accessible from navigator.credentials.
FederatedCredential
Provides information about credentials from a federated identity provider, which is an entity that a website trusts to correctly authenticate a user, and which provides an API for that purpose. OpenID Connect is an example of such a framework.
PasswordCredential
Provides information about a username/password pair.
PublicKeyCredential
Provides a credential for logging in using a more secure system based on asymmetric cryptography instead of a password.

Specifications

SpecificationStatusComment
Credential Management Level 1Working DraftInitial definition.
Web Authentication: An API for accessing Public Key Credentials Level 1RecommendationInitial definition.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:120 次

字数:4866

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文