[jdev] Using Net::Jabber to authenticate to Google Talk
David Eisner
deisner at gmail.com
Fri Jun 29 11:31:16 CDT 2007
I'm trying to use Net::Jabber in a perl script to authenticate to a
Google Talk account. I've run into a few problems and solved them,
but now I'm stuck. Here's the issue:
I'm able to connect to the server and successfully negotiate the TLS
connection. However, the authentication is failing with an
<invalid-authzid/> failure:
XML::Stream: Read: buff(<failure
xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><invalid-authzid/></failure>)
After examining Pidgin's successful authentication, it looks like I
need to add an additional attribute to the auth element. Currently,
Net::XMPP::Protocol.pm is sending this in SASLSendAuth():
XML::Stream: Send: (<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl'
mechanism='PLAIN'>ZG[ snip ]bjI1</auth>)
According to Google (and this is what Pidgen does), I need to set the
"client-uses-full-bind-result attribute" to "true" [1]:
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl'
mechanism='PLAIN'
xmlns:ga='http://www.google.com/talk/protocol/auth'
ga:client-uses-full-bind-result='true'>
... name and password information
</auth>
Looking at SASLSendAuth(), it's not clear I can add the attribute.
Does the Net::XMPP::Namespaces documentation have a prayer of helping
me in this case?
Thanks.
-David
[1] http://code.google.com/apis/talk/jep_extensions/jid_domain_change.html
More information about the JDev
mailing list