From 1869945ff152dd16f7722aadc4adf1c5c5861e52 Mon Sep 17 00:00:00 2001 From: lin <648540858@qq.com> Date: Thu, 13 Mar 2025 14:20:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=91=98=E8=A6=81=E9=89=B4?= =?UTF-8?q?=E6=9D=83=E6=B5=81=E7=A8=8B=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../auth/DigestServerAuthenticationHelper.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/auth/DigestServerAuthenticationHelper.java b/src/main/java/com/genersoft/iot/vmp/gb28181/auth/DigestServerAuthenticationHelper.java index 2de1e913..f4617b89 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/auth/DigestServerAuthenticationHelper.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/auth/DigestServerAuthenticationHelper.java @@ -156,8 +156,17 @@ public class DigestServerAuthenticationHelper { } /** - * Authenticate the inbound request given plain text password. + * 鉴权 * + * A1 = username + ":" + realm + ":" + password + * A2 = REGISTER:URI + * + * HA1 = md5(A1) + * HA2 = md5(A2) + * + * KD = HA2:HA2:qop + * + * response = md5(KD) * @param request - the request to authenticate. * @param pass -- the plain text password. *