使用Oauth2身份验证的Azure Web应用程序的Visual Studio Webtest [英] Visual studio Webtest for Azure web apps with Oauth2 authentication

查看:114
本文介绍了使用Oauth2身份验证的Azure Web应用程序的Visual Studio Webtest的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在尝试使用Oauth2身份验证为azure Web应用程序创建webtest。当我尝试录制网络测试并播放网络测试失败并出现验证问题,例如&bbsp; b
$ b以下,b
$ b<< WebApplication>> .azurewebsites.net / ---- {POST}在测试环境中找不到上下文参数$ HIDDEN1.code



ValidateResponseUrl错误 

<< WebApplication>> .azurewebsites.net / ---- {GET} expectedresponseUrl属性的值login.microsoftonline.com/common/oauth2/authorize--- - {POST}不等于实际回复 



<< WebApplication>> .azurewebsites.net / querystring参数被忽略。



我们可以从中进行身份验证,因此重新运行时会重定向到登录页面。是否有任何webtest插件指南或解决方法来处理这些具有Oauth2身份验证的b $ b $
申请?



注意:我可以为用户获取身份验证令牌并注入请求。但Oauth2需要更多参数,代码,范围,会话等进行身份验证,而不仅仅是令牌。


先谢谢。任何关于此的指针都会有所帮助

解决方案

嗨朋友,


请参考
此博客
 如果提取作者提到的规则可以提供帮助。


 


祝你好运,


Fletcher


Hi,
I was trying to create a webtest for azure web application with Oauth2 authentication. When I tried with recording a webtest and play back the webtest fails with authetication issues like 

below,

<<WebApplication>>.azurewebsites.net/----{POST} Context parameter $HIDDEN1.code not found in test context

ValidateResponseUrl errors 
<<WebApplication>>.azurewebsites.net/----{GET} The value of the expectedresponseUrl property login.microsoftonline.com/common/oauth2/authorize----{POST} does not equal the actual response 

<<WebApplication>>.azurewebsites.net/ querystring parameters were ignored.

from which we can make out authentication is not happening and hence its redirecting to login page upon rerun. Is there any webtest plugin guidence or workaround for dealing with these 

applications with Oauth2 authentications?

Note: I can fetch authentication token for a user and inject in the request. But Oauth2 requires more parameters, code, scope, session etc. for authentication than just token

Thanks in advance. any pointers on this will be helpful

解决方案

Hi friend,

Please refer to this blog if the extraction rules the author mentioned could help.

 

Best regards,

Fletcher


这篇关于使用Oauth2身份验证的Azure Web应用程序的Visual Studio Webtest的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆