Skip to content

Commit

Permalink
[uac] update and improve docs for uac_auth()
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan-iancu committed Apr 20, 2023
1 parent 6940ca8 commit 422f815
Showing 1 changed file with 33 additions and 17 deletions.
50 changes: 33 additions & 17 deletions modules/uac/doc/uac_admin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,6 @@
If the dialog module is loaded and a dialog can be created,
then the auto mode can be done more efficiently.
</para>
<para>
Known limitations in this version:
</para>
<itemizedlist>
<listitem>
<para>
authentication does not support qop auth-int, just qop auth;
</para>
</listitem>
<listitem>
<para>
CSeq not increased during authentication - the response
may be rejected.
</para>
</listitem>
</itemizedlist>
</section>

<section id="dependencies" xreflabel="Dependencies">
Expand Down Expand Up @@ -290,7 +274,7 @@ uac_restore_from();
</example>
</section>

<section id="func_uac_auth" xreflabel="uac_auth()">
<section id="func_uac_auth" xreflabel="uac_auth([algs])">
<title>
<function moreinfo="none">uac_auth()</function>
</title>
Expand All @@ -303,13 +287,45 @@ uac_restore_from();
or via AVPs).
</para>
<para>
As optional parameter, the function may receive a list of auth
algorithms to be considered / supported during authentication:
</para>
<itemizedlist>
<listitem>
<para>MD5, MD5-sess</para>
</listitem>
<listitem>
<para>SHA-256, SHA-256-sess (may be missing, depends on lib support)</para>
</listitem>
<listitem>
<para>SHA-512-256, SHA-512-256-sess (may be missing, depends on lib support)</para>
</listitem>
</itemizedlist>
<para>
Note that the CSeq is automatically increased during authentication.
</para>
<para>
This function can be used from FAILURE_ROUTE.
</para>
<example>
<title><function>uac_auth</function> usage</title>
<programlisting format="linespecific">
...
uac_auth();
...
failure_route[check_auth] {
...
if ($T_reply_code==407) {
if (uac_auth("MD5,MD5-sess")) {
# auth is succesful, just relay
t_relay();
exit;
}
# auth failed (no credentials maybe)
# so continue handling the 407 reply
}
...
}
...
</programlisting>
</example>
Expand Down

0 comments on commit 422f815

Please sign in to comment.