Module: kamailio Branch: master Commit: e2893bef50a5c4dbb1b4cb329fde8908299e3520 URL: https://github.com/kamailio/kamailio/commit/e2893bef50a5c4dbb1b4cb329fde8908...
Author: Kamailio Dev kamailio.dev@kamailio.org Committer: Kamailio Dev kamailio.dev@kamailio.org Date: 2025-02-28T19:46:10+01:00
modules: readme files regenerated - auth ... [skip ci]
---
Modified: src/modules/auth/README
---
Diff: https://github.com/kamailio/kamailio/commit/e2893bef50a5c4dbb1b4cb329fde8908... Patch: https://github.com/kamailio/kamailio/commit/e2893bef50a5c4dbb1b4cb329fde8908...
---
diff --git a/src/modules/auth/README b/src/modules/auth/README index 826c0b04dcc..193f91e0ef5 100644 --- a/src/modules/auth/README +++ b/src/modules/auth/README @@ -86,7 +86,7 @@ Daniel-Constantin Mierla 1.23. pv_www_authenticate usage 1.24. pv_proxy_authenticate usage 1.25. pv_auth_check usage - 1.26. auth_get_www_authenticate + 1.26. auth_get_www_authenticate usage 1.27. auth_algorithm example
Chapter 1. Admin Guide @@ -924,7 +924,7 @@ if (!pv_auth_check("$fd", "$avp(password)", "0", "1")) {
This function can be used from ANY_ROUTE.
- Example 1.26. auth_get_www_authenticate + Example 1.26. auth_get_www_authenticate usage ... if (auth_get_www_authenticate("$fd", "0", "$var(wauth)")) { xlog("www authenticate header is [$var(wauth)]\n"); @@ -939,5 +939,14 @@ if (auth_get_www_authenticate("$fd", "0", "$var(wauth)")) {
Example 1.27. auth_algorithm example ... -auth_algorithm("$alg"); +if($fU == "alice") { + $var(alg) = "SHA-256"; +} else { + $var(alg) = "MD5"; +} +auth_algorithm("$var(alg)"); +if (!auth_check("$fd", "subscriber", "1")) { + auth_challenge("$fd", "1"); + exit; +} ...