您如何确定Microsoft Edge扩展中的身份? [英] How do you determine identity in a Microsoft Edge extension?

查看:184
本文介绍了您如何确定Microsoft Edge扩展中的身份?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Chrome扩展程序中,开发人员可以使用以下方法确定用户身份:

In a Chrome extension a developer is able to determine user identity using the following:

chrome.identity.getProfileUserInfo(function callback)

Microsoft Edge似乎没有相同的功能.

Microsoft Edge does not seem to have the same functionality.

有人知道Microsoft Edge扩展内部的确定用户身份的方法吗?根据Microsoft的文档,它似乎正在考虑进行开发,但是我希望有人找到了另一种方法:供参考( https://docs.microsoft.com/zh-cn/microsoft-edge/extensions/api-support/extension-api-roadmap ).

Is anyone aware of a method for determining user identity inside a Microsoft Edge extension? According to Microsoft's documentation it looks like it's in consideration for development but I was hoping somebody had found another way to do this: for reference (https://docs.microsoft.com/en-us/microsoft-edge/extensions/api-support/extension-api-roadmap).

我们的扩展程序将与服务器端API配合使用,这意味着我们需要协调用户的身份,但是系统管理员正在将其自顶向下部署到组织中的数百个用户;因此,不可能通过扩展名向"每个用户登录".

Our extension will engage with a server-side API which means we need to reconcile the identity of the user, but it is being rolled out by system administrators to hundreds of users in an organization top-down; therefore, it's not possible to "ask" each user through the extension to sign in.

推荐答案

如您所知,

As you know, Edge does not support identity now . So we cannot get user identity using Edge extension APIs. Currently we do not have any tricky do get user identity and do not encourage to do it with a tricky method. The best and safety way is sign-in with your extension now.

如果Edge实现了身份API,则可以将其设计为返回用户的MSA或AAD信息.但是,Edge无法实现该API,即使实现了,也可能无法满足需求,因为给定的企业用户完全有可能将传统上加入域的PC与域用户一起使用(例如constoso \ test),但使用一个MSA(例如sample@hotmail.com)进行同步.

If Edge implemented the identity API, then it could be designed to return the user’s MSA or AAD info. However, Edge doesn’t implement that API, and even if it did, it might not satisfy the need because it’s entirely possible that a given enterprise user is using a traditionally domain joined PC with a domain user (e.g. constoso\test) but using a MSA (e.g. sample@hotmail.com) for syncing.

在大多数情况下,企业可能更愿意获得用户的域身份.如今,他们可以使扩展程序发出一个WebRequest,该WebRequest命中一个内部Web服务,该服务使用Windows集成身份验证向客户端发起挑战,自动进行身份验证(因为它是内部的),并返回一个域凭据链接令牌.

In most cases, an Enterprise would probably be happier to just get the user’s Domain identity. Today, they may be able to have the extension issue a WebRequest that hits an internal web service that challenges the client using Windows Integrated Authentication, auto-authenticates (since it’s internal) and returns a Domain credential-linked token.

这篇关于您如何确定Microsoft Edge扩展中的身份?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆