How to use email address (name@domain.com) as the username?

I am setting up the custom database authorization. (I am using the my own table to authorize users in wildfire)

Now I would like to use the email address as the username when authorizing.

I have tried using email address but it does not work.

Does anyone know if it is possible or if there is something special that needs to be done.

Thanks

Faruk

Faruk

You can do the same by changing the value of xmpp.domain to domain.com.

Select Server properties in menu and edit the value of xmpp.domain.

Hi Faruk,

An ‘’@’’ is one of the illegal character in the node part of node@domain/resource JID formation (period).

However, if want to have nodepart1@nodepart2 as your node you can do so by escaping/encoding ‘’@’’ to ‘’\40’’. This has to be done on the client before sending it to Wildfire because an ‘’@’’ in a node must not be transfered across wire between two XMPP entities. In fact, Wildfire doesn’‘t do the encoding and decoding of illegal characters. Also, I couldn’'t think of any client that can hide the cryptic transformation from users. Users would have to literally type the encoded transformation.

Likewise, your custom database field for a node can have ‘’@’’ but your database query (or some other mediator) must encode it before it’‘s being read and decode it before it’‘s being written by Wildfire. Alternatively, you can pre-encode all ‘’@’’ in the field with ‘’\40’’.

That’'s how I understand it from JEP-0106 and from some tests with Wildfire.

Thanks for your explanation , I was afraid that was the case

Faruk, my English is very bad, but

In my database table of users to mailserver there is a field with username@domain and the users of wildfire make logon using:

node@domain

node = username to our mail server,

domain = xmpp.domain


my wildfire.xml content:

jdbc:mysql:// mailserver / mailuserdatabase ?user= user &password= password SELECT password FROM mailtable WHERE substr(username, 1, locate(’’@’’, username)-1)=?SELECT name,substr(username, 1, locate(’’@’’, username)-1) as username FROM mailtable WHERE substr(username, 1, locate(’’@’’, username)-1)=?SELECT COUNT(*) FROM mailtableSELECT substr(username, 1, locate(’’@’’, username)-1) FROM mailtable SELECT substr(username, 1, locate(’’@’’, username)-1) FROM mailtable WHERE


Emanuel Lázaro

Aracaju - Sergipe - Brasil