Browse Source

Merge pull request #487 from hotcoffie/wvp-28181-2.0

fix:之前引入了错误的DigestServerAuthenticationHelper
pull/484/merge
648540858 3 years ago
committed by GitHub
parent
commit
a4a0394f6b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/RegisterRequestProcessor.java

3
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/RegisterRequestProcessor.java

@ -6,12 +6,12 @@ import com.genersoft.iot.vmp.gb28181.bean.WvpSipDate;
import com.genersoft.iot.vmp.gb28181.transmit.SIPProcessorObserver; import com.genersoft.iot.vmp.gb28181.transmit.SIPProcessorObserver;
import com.genersoft.iot.vmp.gb28181.transmit.event.request.ISIPRequestProcessor; import com.genersoft.iot.vmp.gb28181.transmit.event.request.ISIPRequestProcessor;
import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent; import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent;
import com.genersoft.iot.vmp.gb28181.auth.DigestServerAuthenticationHelper;
import com.genersoft.iot.vmp.service.IDeviceService; import com.genersoft.iot.vmp.service.IDeviceService;
import com.genersoft.iot.vmp.utils.DateUtil; import com.genersoft.iot.vmp.utils.DateUtil;
import gov.nist.javax.sip.RequestEventExt; import gov.nist.javax.sip.RequestEventExt;
import gov.nist.javax.sip.address.AddressImpl; import gov.nist.javax.sip.address.AddressImpl;
import gov.nist.javax.sip.address.SipUri; import gov.nist.javax.sip.address.SipUri;
import gov.nist.javax.sip.clientauthutils.DigestServerAuthenticationHelper;
import gov.nist.javax.sip.header.Expires; import gov.nist.javax.sip.header.Expires;
import gov.nist.javax.sip.header.SIPDateHeader; import gov.nist.javax.sip.header.SIPDateHeader;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -92,7 +92,6 @@ public class RegisterRequestProcessor extends SIPRequestProcessorParent implemen
// 校验密码是否正确 // 校验密码是否正确
passwordCorrect = StringUtils.isEmpty(sipConfig.getPassword()) || passwordCorrect = StringUtils.isEmpty(sipConfig.getPassword()) ||
new DigestServerAuthenticationHelper().doAuthenticatePlainTextPassword(request, sipConfig.getPassword()); new DigestServerAuthenticationHelper().doAuthenticatePlainTextPassword(request, sipConfig.getPassword());
// 未携带授权头或者密码错误 回复401
if (!passwordCorrect) { if (!passwordCorrect) {
// 注册失败 // 注册失败

Loading…
Cancel
Save