<div dir="ltr">Hi Juan, <br><br>Yes, you can use another database/table to do user authorization, just you only need to setup auth_db parameters to map your own schema.<br><br><b>Change auth_db parameters</b><i><br><br>modparam("auth_db", "user_column", "<span style="color: rgb(153, 0, 0);"><b>u</b><b>sername_column</b></span>")<br>
modparam("auth_db", "password_column", "<span style="color: rgb(153, 0, 0);"><b>password_</b><b>column</b></span>") <br>modparam("auth_db", "db_url", "mysql://<b><span style="color: rgb(102, 0, 0);">database_user:password@database_host/database_name</span></b>") </i><br>
<br>You need to take care about how password column and if it's plain text you need to set up calculate_ha1:<br><i>modparam("auth_db", "calculate_ha1", 0)</i><br><b><br>Modify </b><b> </b><b>table name inside your</b><i> </i><b>authentication blocks</b><i><br>
</i><br><i style="color: rgb(204, 0, 0);"><span style="color: rgb(0, 0, 0);">if (www_authorize("your_realm",</span> "<b style="color: rgb(102, 0, 0);">new_users_table</b></i><i>")) {<br> www_challenge("your_realm, "0");<br>
};<br>...<br></i><i style="color: rgb(204, 0, 0);"><span style="color: rgb(0, 0, 0);">if (proxy_authorize("your_realm",</span> "<b style="color: rgb(102, 0, 0);">new_users_table</b></i><i>")) {<br> proxy_challenge("your_realm, "0");<br>
};</i><br><br><br>Regards,<br><br>Gustavo<br><br><div class="gmail_quote">On Sat, Sep 20, 2008 at 10:04 PM, Juan Backson <span dir="ltr"><<a href="mailto:juanbackson@gmail.com">juanbackson@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr"><div>Hi,</div>
<div> </div>
<div>I am maintaining an application DB and an Opensips DB. For the Opensips DB, I would like to move the subscribers table to my app DB so that I don't need to maintain two sip_user_name in two different places. It is do-able? Can I just move that one table to my app DB or I also need the rest of the Opensips tables moved as well?</div>
<div> </div>
<div>Also, is it possible to tell Opensips to check auth against the table I am defining instead of the subscriber table?</div>
<div> </div>
<div>Could anyone have done that give me some suggestion on how to do it?</div>
<div> </div>
<div>Thanks,</div>
<div>JB</div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Gustavo Mistrinelli<br>
</div>