简体   繁体   English

Azure AD-验证令牌

[英]Azure AD - Validate Token

Is there any way to validate token of Azure Active Directory using HttpClient in C# just like Facebook is providing? 有没有办法像Facebook提供的那样使用C#中的HttpClient验证Azure Active Directory的令牌?

Facebook Method to validate token: Facebook验证令牌的方法:

string verifyTokenEndPoint = string.Format("https://graph.facebook.com/debug_token?input_token={0}&access_token={1}", authToken, appToken);

Same way I am looking for the Azure Active Directory, May be with GraphApi or Alternate way? 我正在寻找Azure Active Directory的方式可能与GraphApi或替代方式相同?

Please help me out !! 请帮帮我!

There is no HTTP endpoint for validating JWTs issued by Azure AD. 没有用于验证Azure AD发出的JWT的HTTP终结点。 Instead, you need to use the JSON Web Token Handler SDK from the Azure AD team (or the equivalent for other platforms). 相反,您需要使用来自Azure AD团队的JSON Web令牌处理程序SDK (或其他平台的等效对象)。

Sample code here: https://github.com/Azure-Samples/active-directory-dotnet-webapi-manual-jwt-validation 示例代码在这里: https : //github.com/Azure-Samples/active-directory-dotnet-webapi-manual-jwt-validation

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM