且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

基本身份验证而不是AAD(Azure Active Directory)身份验证

更新时间:2022-12-06 11:58:20

我假设您正在尝试访问一些需要基本身份验证的外部页面或资源.否则,没有理由尝试宣誓.团队似乎支持标签的基本身份验证,例如,我可以将标签添加到带有基本身份验证的网站上,然后会出现一个紫色弹出窗口,但是如何从应用程序中触发它却是另一回事.假设您只是在整个时间一直在呼叫 https://api.abc.com/whatever 应用程序,一种也许"的解决方案是将iframe嵌入团队应用程序视图中的某个位置,然后加载该域,例如https://api.abc.com/test 如果该页面需要身份验证,它将弹出这个紫色的身份验证窗口,您可以在其中键入基本身份验证".执行此操作后,团队浏览器"从理论上讲,现在应该已对会话进行身份验证.

I assume you are trying to access some external page or resource that requires basic auth.. otherwise there would be no reason to try to do oath. Teams Seems to support Basic Auth for tabs, eg i can add a tab point it to a website with basic auth, and a purple popup will appear, but how to trigger it from an application would be a different story. assuming you're just calling https://api.abc.com/whatever all the time in the app, one "maybe" solution would be to embed an iframe somewhere in your teams app view, and load that domain, like https://api.abc.com/test if that page requires authentication, it should popup this purple authenticate window that you can type in your "basic auth" in. after you do that, the teams "browser" in theory should now have a session authed.

如果您不喜欢这种方式,则可以在应用程序中创建一个初始页面,在该页面中输入用户名和密码,然后输入内容,然后进行http调用,如下所示:https://***.com/a/57665644/13470894 吗?

If you don't like this way, you could make an initial page in your app where they type in their username and password, take the input and then make an http call something like this: https://***.com/a/57665644/13470894 ?

希望这会有所帮助

此致