Dle skriptu to vypadá, že problém není ve jméně a v hesle, ale že se nepřipojí na talk.google.com.
my $connection = Net::Jabber::Client->new();
$connection->Connect( "hostname" => SERVER,"port" => PORT ) or die
"Cannot connect ($!)\n";
my @result = $connection->AuthSend( "username" => USER,"password" =>
PASSWORD,"resource" => RESOURCE );
if ($result[0] ne "ok") {
die "Ident/Auth with server failed: $result[0] - $result[1]\n";Kdyby byla chyba v autoriziaci, hlásilo by to zřejmě Ident/Auth with server failed: $result[0] - $result[1].
Možná bych měl nastavit nějak jinak resource?
Zkoušel si to na běžném jabberu, nebo google talku?
Neměl bych tam někam přidat
componentname => 'gmail.com';
connectiontype => 'tcpip';
tls => 1;
Jako je to v tomto skriptu:
http://blogs.perl.org/users/marco_fontani/2010/03/google-talk-with-perl.html?
Také se tam píše toto:
This is an example of the string used to authenticate to gtalk:
<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'>
HASHED_USER+PASS_INFO
</auth>
The difference between what Google needs and what the Jabber modules give is enough for the Google servers to give an error.Pravděpodobně skript se vůbec k ověření jména a hesla nedostane, protože ověřuje jinak, než potřebuje google. Pokud si testoval na normálním jabber serveru, je možné, že ti to funguje, a protože já používám jabber id od googlu, tak mi to nefunguje. Pokud je tomu tak, tak je nejjednodušší řešení, abych si udělal pro tyto účely nějaké standardní jabber id.