【发布时间】:2013-01-15 23:16:09
【问题描述】:
我正在使用 strophe.js 来实现 XMPP 以使用 google 帐户进行连接。我已经在使用 Google OAuth 使用 OAuth 令牌登录我的应用程序。
如何使用 X-OAUTH2 机制使用 strophe 发出 <auth> 请求,而不是提供 XMPP 服务的身份验证密码。
Google 的 X-OAUTH2 身份验证文档指出这是最初的 <auth> 请求:
<auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl"
mechanism="X-OAUTH2"
auth:service="oauth2"
xmlns:auth="http://www.google.com/talk/protocol/auth">
base64("\0" + user_name + "\0" + oauth_token)
</auth>
【问题讨论】:
标签: xmpp oauth-2.0 strophe google-talk