FederatedCredential

这是 实验性技术
检查 浏览器兼容性表格 在生产中使用这之前。

FederatedCredential interface of the the 证书管理 API provides information about credentials from a federated identity provider. A federated identity provider is an entity that a website trusts to correctly authenticate a user, and that provides an API for that purpose. OpenID Connect is an example of a federated identity provider framework.

In browsers that support it, an instance of this interface may be passed in the credential member of the init object for global fetch .

构造函数

FederatedCredential()
创建新的 FederatedCredential 对象。

特性

Inherits properties from its ancestor, Credential .

FederatedCredential.provider 只读
返回 USVString containing a credential's federated identity provider.
FederatedCredential.protocol 只读
返回 DOMString containing a credential's federated identity protocol.

事件处理程序

None.

方法

None.

范例

var cred = new FederatedCredential({
  id: id,
  name: name,
  provider: 'https://account.google.com',
  iconURL: iconUrl
});
// Store it
navigator.credentials.store(cred)
  .then(function() {
  // Do something else.
});
					

规范

规范 状态 Comment
Credential Management Level 1 工作草案 初始定义。

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
FederatedCredential
Chrome 51 Edge ≤79 Firefox ? IE ? Opera Yes Safari ? WebView Android 51 Chrome Android 51 Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android 5.0
FederatedCredential() 构造函数
非标
Chrome 51 Edge ≤79 Firefox ? IE ? Opera ? Safari ? WebView Android 51 Chrome Android 51 Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android 5.0
protocol
Chrome 51 Edge ≤79 Firefox ? IE ? Opera Yes Safari ? WebView Android 51 Chrome Android 51 Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android 5.0
provider
Chrome 51 Edge ≤79 Firefox ? IE ? Opera Yes Safari ? WebView Android 51 Chrome Android 51 Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android 5.0

图例

完整支持
完整支持
兼容性未知
兼容性未知
实验。期望将来行为有所改变。
实验。期望将来行为有所改变。
非标。预期跨浏览器支持较差。
非标。预期跨浏览器支持较差。