Browse Source

auth: docs - adjustments to examples

Daniel-Constantin Mierla 7 years ago
parent
commit
998d26aef7
1 changed files with 14 additions and 8 deletions
  1. 14 8
      src/modules/auth/doc/auth_functions.xml

+ 14 - 8
src/modules/auth/doc/auth_functions.xml

@@ -11,7 +11,7 @@
 <section id="auth.functions" xmlns:xi="http://www.w3.org/2001/XInclude">
 
     <title>Functions</title>
-    
+
     <section id="auth.f.consume_credentials">
 	<title><function>consume_credentials()</function></title>
 	<para>
@@ -32,7 +32,7 @@
 ...
 if (www_authenticate("realm", "subscriber")) {
     consume_credentials();
-};
+}
 ...
 	    </programlisting>
 	</example>
@@ -122,6 +122,7 @@ if (has_credentials("myrealm")) {
 ...
 if (!www_authenticate("$td", "subscriber")) {
 	www_challenge("$td", "1");
+	exit;
 }
 ...
 </programlisting>
@@ -152,7 +153,8 @@ if (!www_authenticate("$td", "subscriber")) {
 ...
 if (!proxy_authenticate("$fd", "subscriber")) {
 	proxy_challenge("$fd", "1");
-};
+	exit;
+}
 ...
 </programlisting>
 		</example>
@@ -181,7 +183,8 @@ if (!proxy_authenticate("$fd", "subscriber")) {
 ...
 if (!auth_check("$fd", "subscriber", "1")) {
 	auth_challenge("$fd", "1");
-};
+	exit;
+}
 ...
 </programlisting>
 		</example>
@@ -295,7 +298,8 @@ if (!auth_check("$fd", "subscriber", "1")) {
 ...
 if (!pv_www_authenticate("$td", "123abc", "0")) {
 	www_challenge("$td", "1");
-};
+	exit;
+}
 ...
 </programlisting>
 		</example>
@@ -329,7 +333,8 @@ if (!pv_www_authenticate("$td", "123abc", "0")) {
 $avp(password)="xyz";
 if (!pv_proxy_authenticate("$fd", "$avp(password)", "0")) {
 	proxy_challenge("$fd", "1");
-};
+	exit;
+}
 ...
 </programlisting>
 		</example>
@@ -372,8 +377,9 @@ if (!pv_proxy_authenticate("$fd", "$avp(password)", "0")) {
 ...
 $avp(password)="xyz";
 if (!pv_auth_check("$fd", "$avp(password)", "0", "1")) {
-	proxy_challenge("$fd", "1");
-};
+	auth_challenge("$fd", "1");
+	exit;
+}
 ...
 </programlisting>
 		</example>