You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by Mohit Bhonde <mo...@gmail.com> on 2012/03/12 11:21:27 UTC

Regarding XMPP Clients

Hello,

I had a question regarding the XMPP Client & server side domain
configuration.

=== SERVER SIDE ===

OpenStorageProviderRegistry providerRegistry = new
OpenStorageProviderRegistry();


// custom authentication provider
        providerRegistry.add(new MangoAppsAuthentication());

        // a roster manager is also required
        providerRegistry.add(new MemoryRosterManager());
 XMPPServer server = new XMPPServer("xmpp.mangoapps.com");

...


My class MangoAppsAuthentication
implements (org.apache.vysper.xmpp.authorization.UserAuthorization)


=== CLIENT SIDE ====

I use a XMPP Client (Pidgin) with the following config parms

Protocol: XMPP
Username: mohitb
Domain: mangospring.com
Resource: chatClient
Password: mypassword

Additionally i set the port and server to connect to.

When i try to login through the XMPP Client the call back method
boolean *verifyCredentials<http://www.jarvana.com/jarvana/view/org/apache/vysper/vysper-core/0.7/vysper-core-0.7-javadoc.jar%21/org/apache/vysper/xmpp/authorization/UserAuthorization.html#verifyCredentials%28java.lang.String,%20java.lang.String,%20java.lang.Object%29>
*(java.lang.String username, java.lang.String passwordCleartext,
java.lang.Object credentials)

gets the username as mohitb@xmpp.mangoapps.com when instead i had
configured mohitb@mangospring.com on the client.

Does this mean i will need to have an instance of XMPP Server per domain? I
am not sure i get this behavior of the XMPP Clients?

Not sure what am i missing.



-- 
Thanks & Regards,
Mohit Bhonde

Re: Regarding XMPP Clients

Posted by Mike Mahoney <mi...@thingworx.com>.
> // custom authentication provider
>        providerRegistry.add(new MangoAppsAuthentication());
> 
>        // a roster manager is also required
>        providerRegistry.add(new MemoryRosterManager());
> XMPPServer server = new XMPPServer("xmpp.mangoapps.com");

Here you are setting your XMPP server domain to be 'xmpp.mangoapps.com'.

> 
> === CLIENT SIDE ====
> 
> I use a XMPP Client (Pidgin) with the following config parms
> 
> Protocol: XMPP
> Username: mohitb
> Domain: mangospring.com
> Resource: chatClient
> Password: mypassword

But here, you specify the domain as mangospring.com.  The XMPP domain does not need to be the same as the server's DNS name, but they often are the same.  If you want them to match, then you should use:

	XMPPServer server = new XMPPServer("mangospring.com")