<div dir="ltr">Bogdan,<div><br></div><div><br></div><div>would I have to use the exec module to cast the into the username and password variables? Also I am not sure how the function expects those variables to be passed to it ? It is based on variables with these two names to be set prior to being called?</div><div><br></div><div><div>$var(username)="abc";</div><div>$avp(password)="xyz";</div></div><div><br></div><div>Thanks,</div><div>Tito</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 26, 2017 at 7:21 AM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<tt>Hi Tito,<br>
<br>
You can do that by fetching the password via an explicit DB query
from script and pushing it for auth check using
pv_www_authorize():<br>
<a class="m_4140612310025486353moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/2.3.x/auth.html#idp5590848" target="_blank">http://www.opensips.org/html/<wbr>docs/modules/2.3.x/auth.html#<wbr>idp5590848</a><br>
<br>
Best regards,<br>
</tt>
<pre class="m_4140612310025486353moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="m_4140612310025486353moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.<wbr>com</a>
OpenSIPS Bootcamp 2017, Huston, US
<a class="m_4140612310025486353moz-txt-link-freetext" href="http://opensips.org/training/OpenSIPS_Bootcamp_2017.html" target="_blank">http://opensips.org/training/<wbr>OpenSIPS_Bootcamp_2017.html</a>
</pre><div><div class="h5">
<div class="m_4140612310025486353moz-cite-prefix">On 05/25/2017 04:51 PM, Tito Cumpen
wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div dir="auto">
<div dir="auto">Group,</div>
<div dir="auto"><br>
</div>
Is it possible to use a rest api for auth_db? Meaning can
opensips authenticate a user based on a rest query against a
rest api? I thought about using db http by fronting the request
with a local http server but I don't see a way to pass a custom
headers to the query. This custom header would contain the auth
session token.
<div dir="auto"><br>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">Thanks,</div>
<div dir="auto">Tito</div>
</div>
<br>
<fieldset class="m_4140612310025486353mimeAttachmentHeader"></fieldset>
<br>
</div></div><pre>______________________________<wbr>_________________
Users mailing list
<a class="m_4140612310025486353moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a class="m_4140612310025486353moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
</blockquote></div><br></div>