我已经用C ++编写了EWS应用程序。当前它支持基本和NTLM身份验证,现在尝试支持OAuth身份验证
由于它是C ++应用程序,因此无法使用.NET AcquireToken,因此我需要发布以下OAuth身份验证请求
POST https://login.microsoftonline.com/b9bd2162xxx/oauth2/token HTTP / 1.1
内容类型:application / x-www-form-urlencoded
资源= https://tailspin.onmicrosoft.com/surveys.webapi
&client_id = 87df91dc-63de-4765-8701-b59cc8bd9e11
&client_assertion_type = urn:ietf:params:oauth:client-assertion-type:jwt-bearer
&client_assertion = eyJhbGci ...
&grant_type = authorization_code
所以我的问题是,如果我正在构造请求,如何获取client_assertion字符串?是否有任何API \开源库可以使用.pfx \ X.509证书获取此字符串?