0
我想用AutoBahn来测试websocket服务器。服务器有一个用户名/密码。 发送用户名/密码进行身份验证的正确方法是什么?它在json文件中,如下所示(ws:// username:password @ localhost:8787)。这似乎不适用于我。 谢谢。AutoBahn Websoket登录
{
"options": {"failByDrop": false},
"outdir": "./reports/servers",
"servers": [
{"agent": "TestWebSocket",
"url": "ws://username:[email protected]:8787",
"options": {"version": 13}}
],
"cases": ["*"],
"exclude-cases": [],
"exclude-agent-cases": {}
}
使用Autobahn进行身份验证的最佳方式是什么? – securecurve
有关示例,请参阅https://github.com/tavendo/AutobahnPython/tree/master/examples/wamp/authentication。这是WAMP。对于原始WebSocket,您可以在由Twisted提供服务的子路径上运行Autobahn,并通过Twisted Web机制进行身份验证。 – oberstet
我们如何在服务器端与websocket握手时添加标题? – securecurve