Hi all,

I thought it was going to be a bit easier to get mod_auth_sql to work
with a hashed password in a PostgreSQL database, but I ended up writing
an entirely new module that supports account creation and password
changes too. I'm a longtime Prosody user but am new to Lua so could
certainly use some feedback.

The module requires postgresql-contrib for the pgcrypto module. It's
currently hard-coded to use the Blowfish algorithm, but it's possible to
use with a custom schema by defining psql_users_table,
psql_localpart_column, psql_domainpart_column, and psql_password_column
in prosody.cfg.lua. Like mod_auth_sql, it uses the settings from the sql
section of the main config to connect to the database.

I reused a lot of code from mod_auth_sql and a bit from
mod_auth_wordpress as well, and Zash in the Prosody chatroom helped too
:).

Anyway, it's here for now:
https://www.brianpcurran.com/mod_auth_psql_hashed.lua

I would appreciate any feedback or thoughts! Thanks.

-Brian

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at http://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to