[ejabberd] Auth issue when migrated from ejabberd 14 to 17

Evgeny Khramtsov xramtsov at gmail.com
Mon May 8 20:16:31 MSK 2017


Mon, 8 May 2017 20:59:58 +0530
Bhag Chandra <bhag.chandra.erl at gmail.com> wrote:

> In my previous ejabberd setup, I used to send the <auth> along with
> the stream initiation request from client. So xmpp packet looked like
> this :
> 
> 
> 
> <stream:stream to="server" xml:lang="*" version="1.0" xmlns:stream="
> http://etherx.jabber.org/streams" xmlns="jabber:client">
> 
> <mysplauth xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
> <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">
> string_string_base64_string</auth>
> <version xmlns="urn:ietf:params:xml:ns:xmpp-sasl"> 1.0 </version>
> <resource xmlns="urn:ietf:params:xml:ns:xmpp-sasl"> resource
> </resource> </mysplauth>
> 
> 
> 
> I know this way of sending auth in stream initiation is not
> conventional way of doing it, but I was doing it and it worked fine.
> 
> But the 17.04 is more modular and I can understand how to implement
> same thing in it. 17.04 completely ignores my auth stanza.

Adding new tags to the xmpp library is described here:
https://github.com/processone/xmpp/issues/9

The specification for your element will look similar to this:
https://gist.github.com/zinid/12775db809d3aeb653920730f382f17c
(adjust 'min' and 'max' parameters if you need your elements to be
mandatory).

With this schema applied, you will receive your element in the form:

#mysplauth{version = {1,0},
           resource = <<"resource">>,
           auth = #sasl_auth{mechanism = <<"PLAIN">>,
                             text = <<"some_data">>}}


More information about the ejabberd mailing list