INT-2786 Do not Provide Fixed XMPP Resource String

Previously, the connection resource was hard-coded to 'Smack' by
default.

According to RFC 6120 section 7.6.  Server-Generated Resource Identifier
if the connecting client does not provide resource string, server will
generate RANDOM one for it.
Smack API allows this by providing null resource in
XMPPConnection#login(username, password, resource) call.
See Smack's SASLAuthentication documentation.

Tested with XMPP sample (including default resource and configuring
as 'Smack').
This commit is contained in:
Tomasz Sterna
2012-10-12 11:52:08 +02:00
committed by Gary Russell
parent f9ce029366
commit 9e5ec80533
3 changed files with 18 additions and 12 deletions

View File

@@ -40,7 +40,7 @@ public class XmppConnectionFactoryBean extends AbstractFactoryBean<XMPPConnectio
private final ConnectionConfiguration connectionConfiguration;
private volatile String resource = "Smack"; // default value used by Smack
private volatile String resource = null; // server will generate resource if not provided
private volatile String user;