I am currently using MySQL to proxy authorization using the auth_db module. I 
am utilizing the proxy_authorize function to authorize users in a MySQL table, 
and it is working perfectly.

However, I need to switch to MongoDB as my database instead of MySQL. The issue 
is that it appears auth_db only supports MySQL and PostgreSQL databases. My 
concern is that I must use MongoDB as the database for authorization in 
OpenSIPS. Is it possible to authorize users in OpenSIPS using MongoDB with the 
auth_db module, or should I consider an alternative module or approach?

Load auth_db module

loadmodule "auth_db.so"
modparam("auth_db", "db_url", "mysql://DB_USER:DB_PASSWORD@DB_HOST/DB_NAME")
modparam("auth_db", "load_credentials", "$avp(tmp_id)=id")
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")

check condition in routes.

if (!proxy_authorize("", "TABLE)_NAME")) {
      proxy_challenge("", "0");
      exit;
}

Best Regards,
----
Harsh Patel
Team Lead.
Inextrix Technologies Pvt Ltd (www.inextrix.com)
Mo: +1 315 898 1049
https://www.inextrix.com/

Disclaimer:
The information contained in this communication is confidential and may be 
legally privileged. It is intended solely for the use of the individual or 
entity to whom it is addressed and others authorized to receive it. If you are 
not the intended recipient you are hereby notified that any disclosure, 
copying, distribution or taking action in reliance on the contents of this 
information is strictly prohibited and may be unlawful. Please notify the 
sender immediately and destroy all copies of this message and any attachments 
contained in it.
_______________________________________________
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to