我目前正在 Azure 云服务上设置 Web API,并希望将 Azure API 管理与 OAuth 和 Azure Active Directory (AD) 结合使用作为授权服务器。
我的问题是: 在 AD 中,我创建了我的应用程序,并在“查看端点”列表中查找我的 token 请求端点(不使用原始 key ):
https://login.windows.net/e4b3b3s1-02yt-8fw1-54i3-973aa45rd56b/oauth2/token?api-version=1.0
但是,在本教程中:http://azure.microsoft.com/en-us/documentation/articles/api-management-howto-oauth2/
token 请求的格式为:
https://login.windows.net/<APPID>/oauth2/token
For an Azure Active Directory OAuth 2.0 server, the Token endpoint
URL will have the following format, where has the format of
yourapp.onmicrosoft.com.
我应该使用哪一个?
提前致谢。
最佳答案
我建议使用 AAD 中列出的那些,因为它们具有指定要使用的版本的附加参数。
关于Azure API 管理 - OAuth 服务器 token 端点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27442216/