문제

I am using strophe.js for implementing XMPP to connect using google account. I am already using Google OAuth for login into my application using the OAuth token. How do I use the X-OAUTH2 mechanism to make the <auth> request using strophe, rather than providing the password for the authentication to the XMPP service. Google's documentation for the X-OAUTH2 authentication states this is the initial <auth> request to make:

<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>
도움이 되었습니까?

해결책

I'm starting to building a client using strophe, to which I'm new too. I guess you'll need to use a proper BOSH connection manager to authenticate to xmpp server with oauth2. I know punjab is popular, you could try to use that, but I'm looking at Node BOSH, as mentioned here XMPP client Not connecting - using Node Bosh server

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top