Openfire and Net::XMPP
I was writing a perl script the other day which connects to my [Openfire XMPP server](http://www.igniterealtime.org/projects/openfire/index.jsp) and does some stuff (listening for incoming messages, etc.).
When I started my perl script it always failed with the error message:
ERROR: Authorization failed: error - not-authorized
After re-checking the password and username it still didn't want to work.
In the end [I found out](http://www.igniterealtime.org/community/thread/20551) that the the perl [Net::XMPP](http://search.cpan.org/~hacker/Net-XMPP-1.02/lib/Net/XMPP.pm) SASL authorization doesn't want to play with the SASL implementation in Openfire.
Modifying the Protocol.pm of Net::XMPP can help to solve this problem.
Open this file and comment out these lines (at line ~1800):
if($self->{STREAM}->GetStreamFeature($self->GetStreamID(),"xmpp-sasl"))
{
return $self->AuthSASL(%args);
}
After this little tweak Net::XMPP should talk to Openfire without grumbling.