|
@@ -686,6 +686,16 @@ end:
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ *
|
|
|
+ */
|
|
|
+static int ki_pv_proxy_authenticate(
|
|
|
+ sip_msg_t *msg, str *realm, str *passwd, int flags)
|
|
|
+{
|
|
|
+ return pv_authenticate(msg, realm, passwd, flags, HDR_PROXYAUTH_T,
|
|
|
+ &msg->first_line.u.request.method);
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
*
|
|
|
*/
|
|
@@ -727,6 +737,26 @@ error:
|
|
|
return AUTH_ERROR;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ *
|
|
|
+ */
|
|
|
+static int ki_pv_www_authenticate(
|
|
|
+ sip_msg_t *msg, str *realm, str *passwd, int flags)
|
|
|
+{
|
|
|
+ return pv_authenticate(msg, realm, passwd, flags, HDR_AUTHORIZATION_T,
|
|
|
+ &msg->first_line.u.request.method);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ *
|
|
|
+ */
|
|
|
+static int ki_pv_www_authenticate_method(
|
|
|
+ sip_msg_t *msg, str *realm, str *passwd, int flags, str *method)
|
|
|
+{
|
|
|
+ return pv_authenticate(
|
|
|
+ msg, realm, passwd, flags, HDR_AUTHORIZATION_T, method);
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
*
|
|
|
*/
|
|
@@ -1403,6 +1433,21 @@ static sr_kemi_t sr_kemi_auth_exports[] = {
|
|
|
{ SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_INT,
|
|
|
SR_KEMIP_INT, SR_KEMIP_NONE, SR_KEMIP_NONE }
|
|
|
},
|
|
|
+ { str_init("auth"), str_init("pv_proxy_authenticate"),
|
|
|
+ SR_KEMIP_INT, ki_pv_proxy_authenticate,
|
|
|
+ { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_INT,
|
|
|
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
|
|
|
+ },
|
|
|
+ { str_init("auth"), str_init("pv_www_authenticate"),
|
|
|
+ SR_KEMIP_INT, ki_pv_www_authenticate,
|
|
|
+ { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_INT,
|
|
|
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
|
|
|
+ },
|
|
|
+ { str_init("auth"), str_init("pv_www_authenticate_method"),
|
|
|
+ SR_KEMIP_INT, ki_pv_www_authenticate_method,
|
|
|
+ { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_INT,
|
|
|
+ SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE }
|
|
|
+ },
|
|
|
{ str_init("auth"), str_init("has_credentials"),
|
|
|
SR_KEMIP_INT, ki_has_credentials,
|
|
|
{ SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
|