Module: kamailio
Branch: master
Commit: b65c19fa29976b59403433ed8a5de4b7eef41afc
URL:
https://github.com/kamailio/kamailio/commit/b65c19fa29976b59403433ed8a5de4b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-04-21T11:32:07+02:00
auth: expose www_challenge() to kemi
- GH #3423
---
Modified: src/modules/auth/auth_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/b65c19fa29976b59403433ed8a5de4b…
Patch:
https://github.com/kamailio/kamailio/commit/b65c19fa29976b59403433ed8a5de4b…
---
diff --git a/src/modules/auth/auth_mod.c b/src/modules/auth/auth_mod.c
index 3a05689f002..e522538e415 100644
--- a/src/modules/auth/auth_mod.c
+++ b/src/modules/auth/auth_mod.c
@@ -1102,6 +1102,14 @@ static int www_challenge(struct sip_msg *msg, char* realm, char
*flags)
return -1;
}
+/**
+ *
+ */
+static int ki_www_challenge(struct sip_msg *msg, str* realm, int flags)
+{
+ return auth_challenge_hftype(msg, realm, flags, HDR_AUTHORIZATION_T);
+}
+
/**
*
*/
@@ -1259,6 +1267,11 @@ static sr_kemi_t sr_kemi_auth_exports[] = {
{ SR_KEMIP_STR, SR_KEMIP_INT, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
+ { str_init("auth"), str_init("www_challenge"),
+ SR_KEMIP_INT, ki_www_challenge,
+ { SR_KEMIP_STR, SR_KEMIP_INT, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
{ str_init("auth"), str_init("pv_auth_check"),
SR_KEMIP_INT, pv_auth_check,
{ SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_INT,