是否有任何方法可以使用我自己的用户名和密码页(托管在Azure之外)通过web应用程序或web api登录到Azure活动目录(带有AD凭据)?
从我的调查来看,似乎没有编程方法可以发送用户名和密码来通过Azure AD对用户进行身份验证(如果你在Azure之外托管了一个应用程序) 不确定他们是否认为这是某种安全漏洞(我不认为它是强制的https?)
似乎您只能通过代码授权来验证用户身份(这意味着从应用程序中弹出以登录到外部站点)。
最后,我想创建一个python flask api,如果可能的话,它可以直接针对Azure AD进行身份验证。 我以前用Oauth grant_type=password发送用户名和密码(与其他身份验证系统一起)完成过这项工作,但我不认为Azure AD支持这项功能(如果im错误,请更正我?) 我知道grant_type=client_credentials是受支持的,但这看起来像是它的服务到服务身份验证,这不是im所追求的 http://msdn.microsoft.com/en-us/library/azure/dn645543.aspx
如果不可能在Azure之外托管登录页面,那么是否有可能在Azure内部托管一个登录页面,如以下示例所示: http://msdn.microsoft.com/en-us/library/azure/bc8af4ff-66e7-4d5b-b3d4-c33d2c55d270#BKMK_Browser 没有带有密码字段的自定义登录页。。(似乎只有打开的id登录)
Azure活动目录支持Resource Owner Password Credentials Grant(
grant_type=password
)流。但是,在使用之前,请考虑是否确实需要它。正如它在OAuth 2.0 RFC中所说:如果您已经确定其他支持的流肯定不会对您的场景起作用,那么也一定要遵循RFC中的第二点建议:
(在两种情况下都增加了强调。)
GitHub上有一个.NET和ADAL示例使用这个流,它应该足够简单,可以在Python中实现:https://github.com/AzureADSamples/NativeClient-Headless-DotNet
编辑:你可以在任何你想要的地方托管你的应用程序,它不需要在Azure上。这适用于所有流。
相关问题 更多 >
编程相关推荐