问题描述
我正在尝试将Devops与另一个第三部分系统集成,但是我尝试使用oAuth2.0从邮递员访问Devops,但是它总是失败,并向我抛出错误 {"Error":"invalid_client","ErrorDescription:无效的客户端身份验证令牌."}
I am trying integrate Devops with another 3rd part system, but i tried to access Devops from postman using oAuth2.0, but it is always failing, throwing me a error {"Error":"invalid_client","ErrorDescription":"Invalid client auth token."}
Devops是否支持oAuth?如果是这样,我想念的是什么,所以我得到了这个错误?
Does Devops support oAuth? if so what i am missing so i got this error?
推荐答案
问题是DevOps由于某种原因使用了非标准头文件.这导致内置的邮递员无法正常工作.我想解决此问题的方法是将Auth网址直接输入到您的浏览器中.然后,您可以从回调URL中提取身份验证代码.然后使用该代码在postman中的令牌端点上发布 https://app.vssps.visualstudio.com/oauth2/token
The problem is that DevOps is using non standard headers for some reason. This causes the built in postman to not work. The way that I figured out to work around this is to input the Auth url directly into your browser. You can then extract the auth code from the callback URL.Then with that code, make a post to the token endpoint in postmanhttps://app.vssps.visualstudio.com/oauth2/token
使用x-www-form-urlencoded正文并填写以下键
Use x-www-form-urlencoded body and fill out the following keys
"client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"
"client_assertion", your app secret
"grant_type", "urn:ietf:params:oauth:grant-type:jwt-bearer"
"assertion", your auth code from previous step
"redirect_uri", your callbackurl
这篇关于使用Postman oAuth2.0无法获得Devops的授权代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!