BOSH Over Tigase Got Not-Authorized

Angelo Chen
Added about 5 years ago

I installed Tigase-5.2.0-rc1-b3373 on my local, and the 5280 port is running.

And for the client side, I using Jaxmpp2(GWT), version: 2.1.0-SNAPSHOT, the login code snip is below:

String userValue = jid.getEnteredValue();

    String passwordValue = password.getEnteredValue();

    XmppService.get().getProperties().setUserProperty(SessionObject.DOMAIN_NAME, JID.jidInstance(userValue).getDomain());

    String httpBase = XmppService.config().get("httpBase");

    XmppService.get().getProperties().setUserProperty(AbstractBoshConnector.BOSH_SERVICE_URL_KEY, httpBase);



    XmppService.get().getProperties().setUserProperty(SessionObject.PASSWORD, passwordValue);

    XmppService.get().getProperties().setUserProperty(SessionObject.RESOURCE, "web");

    XmppService.get().getProperties().setUserProperty(SessionObject.NICKNAME, "angelo");

    try {



    } catch (JaxmppException e) {



During login there’s no exception, but the last play load is:




<body xmlns="" xmlns:stream="" secure="true" xmpp:version="1.0" xmlns:xmpp="urn:xmpp:xbosh" ack="3985433" from="angelo-chens-mbp.local"><failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure></body>

the httpBase i set in the script is: http://angelo-chens-mbp:5280/ which angelo-chens-mbp is my hostname, also the virtual host of tigase server. The jid and password is correct because i can login with it using Psi.

Is there anything I mis-use?

Replies (2)


Added by Artur Hefczyc TigaseTeam about 5 years ago

The response from the server means that Bosh is really setup correctly and everything is OK on the server side. The only problem is the user account or password.

Failure and not-authorized response means password or user account does not match. Please make sure if the entered exactly the same as in Psi. Could you give us also Psi communication for user authentication so we can compare authentication data.

From the request you send to the server it looks like you set user ID to: angelo@angelo-chens-mbp.local and password to angelogggg. Make sire this is correct in the Tigase DB.


Added by Angelo Chen about 5 years ago

thanks, it's caused by the wrong password.