1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Has anyone tried to get Openfire external auth to work against XF?

Discussion in 'General PHP and MySQL Discussions' started by HittingSmoke, Apr 22, 2014.

  1. HittingSmoke

    HittingSmoke Active Member

    I'm in the preliminary stages of experimenting with Openfire XMPP for my site's chat server. It natively supports external auth so I'd like that to be part of my implementation.

    According to the docs configuring Openfire to auth from an external database is about as easy as plugging in the database info and telling it where the password hash is stored:

    HTML:
    <jdbcAuthProvider>
         <passwordSQL>SELECT password FROM user_account WHERE username=?</passwordSQL>
         <passwordType>sha256</passwordType>
    </jdbcAuthProvider>
    I think I have this configured to work with XenForo using this query:

    Code:
    SELECT data FROM xf_user_authenticate FULL OUTER JOIN xf_user ON xf_user_authenticate.user_id = xf_user.user_id WHERE username=?
    The questionmark is a placeholder which is automatically filled by the Openfire server login system.

    I can't test any of this immediately because I'm trying to get bcrypt support working for Openfire and make sure it can read the binary database field the XenForo password hashes are stored in.

    I'm curious if anyone else has had success using a straight connection to the XenForo MySQL tables to serve external auth purposes and how those experiences went.
     

Share This Page